Getting and displaying records from a database is one of the key features of Microsoft® Visual InterDev™. You manipulate data using data-bound design-time controls, primarily the Recordset control.
A Recordset control is bound to a particular database using a database connection, and specifies a particular set of records from that database. For more information on the control and its properties, see Recordset Design-Time Control.
Visual InterDev makes it easy to create Recordset controls by using the data environment. You can also create Recordset controls by using the Toolbox, and then associate these controls with the data environment. For information on how the data environment is related to controls and other database features of Visual InterDev, see Data Access Architecture.
To create a Recordset control using the data environment
The data connection is displayed in Project Explorer in the DataEnvironment folder, underneath the Global.asa file.
Tip You can also right-click the DataEnvironment folder and then click Add Data Connection to create a data connection. The same set of dialog boxes is displayed that appears when you use the Add Data Connection command on the Project menu.
The Command Properties page is displayed.
Then select this type of database object in the Database Object box and the name of an object of this type in the database in the Object Name box.
To construct this SQL statement, you can press the SQL Builder button, and use the SQL Builder.
At any time, you can drag the Command object onto an ASP or HTML page. This creates a Recordset object, which is bound to the specified set of records in the database.
Using the data environment is the preferred method to create Recordset controls. Once the Command object is created using the data environment, modifying the Command object is simple. You only need to update the object once in the data environment. You don't have to continually recreate a Recordset control on different ASP or HTML pages for the same set of records.
You can, however, insert a Recordset control onto an ASP or HTML page from the Toolbox, and then associate this Recordset control with an existing Command object in the data environment.
To associate a Recordset control with a Command object
Tip If the Recordset control is not shown in the Toolbox, right-click on the Toolbox, choose Customize Toolbox, and add the Recordset control.
The Recordset control displays the Connection, Database Object, and Object Name fields. These are properties of the Recordset object.
For more information about setting the properties for the Recordset control, see Recordset Properties Dialog Box.
Now that you've created a recordset and specified its records, you can display data from this recordset on a Web page. For more information, see Displaying Data on Your Web Page.