Before you can display or edit data on your Web page in Microsoft® Visual InterDev™, you must connect to a database. A data connection provides your Visual InterDev project with access to a particular database. You can then use this data connection to connect to the database and display its data on your Web page.
When you connect to a database, you first create a data source name (DSN) for the database or choose an existing one. Then, you use the DSN to create a data connection and add it to your project.
To create a data source name
The Select Data Source dialog box appears.
The extension .dsn is automatically added to the file name.
Note When you specify a database, use the relative path to the database, not its location on your development computer. For example, if the database is located on a Web server, use the UNC path to the database. This ensures the database will be available from your Web server.
You are returned to the Select Data Source dialog box, and the file data source name you created is displayed in the list.
For more information on the types of data sources you can create, see Choosing a Data Source Name in the Microsoft® Visual Database Tools documentation.
Tip You can also use the ODBC Data Source Administrator (located in the ODBC folder of your Control Panel) to create and name data sources. These data sources will appear in the Select Data Source dialog box, and you can use them to create data connections in Microsoft Visual InterDev.
Once you've created a data source name for a database, you can use it to establish a data connection to that database.
To add a data connection to your project
A dialog box showing parameters for the data connection is displayed. The dialog box you see depends on the type of data source you have selected. For example, if you select a SQL Server data source, you'll see a SQL Server Login dialog box.
The data connection is displayed under the DataEnvironment folder in your project, underneath the global.asa folder. You can also browse and edit the data from this database in the Data View window.
You are now ready to retrieve and view the data you want from the database. For more information, see Querying the Database.