Setting Up a System DSN
Before you can even use ADO to connect to a database in ASP you must set up a Data Source Name(DSN) on the webserver. This can be done via ODBC 32 or you can hard code a DSN in your ASP.
The following tutorial will walk you through setting up a system DSN on your Win95/98 running Personal Web Server or an NT box running IIS.
First thing you need to go to the Start menu/Settings/Control Panel and then click on the ODBC icon as illustrated below.(figure 1.0)
figure 1.0 - Clicking on the ODBC Icon.
Once you click on the icon the initial ODBC Data Source Administrator tabbed dialog box will open(figure 1.1). From here click on the System DSN tab to begin the installation.
figure 1.1 - The ODBC Data Source Administrator
Click on the Add button, from here you need to select the type of database driver you will use. In this example I will be using Access 97 driver and the database located on the Web Server. You could select any of a number of drivers from SQL Server to Oracle.
figure 1.2 - Selecting the Driver Type.
Then just enter in the Data Source Name -- this is what you will be using in your ASP script to reference that database. Then just click on the Select button and select the Access database on your web server or network drive and click the OK button. That's it, your data source is created and ready to be manipulated with ADO and ASP!
figure 1.3 - Naming the Data Source and Selecting the Database.