To connect to a database by using ASP pages, you must first create a Data Source Name (DSN) on the Web server for the type of database to which you want to connect. To do so, use one of the following methods.
To create a DSN for a database program (such as Microsoft Access):
Log on to the Web server computer as administrator.
Click Start, point to Settings, and then click Control Panel.
Double-click Administrative Tools, and then double-click Data Sources (ODBC).
Click the System DSN tab, and then click Add.
Select the database driver that you want (for example, Microsoft Access Driver (*.mdb), and then click Finish.
In the Data Source Name box, type the name that you want to use when you refer to this DSN in your ASP code. For example, Northwind.
In the Description box, type an optional description for the DSN. For example, Northwind DSN.
In the Select Database dialog box, browse to and select the database that you want. For example, Northwind.mdb.
NOTE: If the database is not on the Web server, click Network, and then click Browse. Locate the shared network folder that contains the database, and then click OK. Click Finish, and then select the database that you want.
If you want to automatically provide login credentials to the database when you use this DSN, type them into the Login name and Password boxes. Click OK.
If you experience difficulty connecting to a database by using ASP Web pages, verify that you have sufficient permissions to access the database:
Verify that the DSN is using an account with sufficient permissions to access the database.
If you attempt to connect to a SQL Server over a network, ensure that you use a domain account as your anonymous IIS account.
If you attempt to connect to a Microsoft Access database, ensure that the IIS account has Write permissions to the folder in which the database is stored. This is to enable the creation of a temporary file when users access the database.
Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, Microsoft Windows 2000 Professional Edition, Microsoft Small Business Server 2000 Standard Edition, Microsoft Internet Information Services 5.0