ADO Database Connection
Before a database can be gotten to from a website page, a database association has to be established.
Create a DSN-less Database Connection
The least demanding approach to associate with a database is to utilize a DSN-less association. A DSN-less association can be utilized against any Microsoft Access database on your web site.
If you have a database called "northwind.mdb" situated in a web catalog like "c:/webdata/", you can associate with the database with the accompanying ASP code:
Note, from the model over, that you need to determine the Microsoft Access database driver (Provider) and the physical way to the database on your computer.
Create an ODBC Database Connection
If you have an ODBC database called "northwind" you can associate with the database with the accompanying ASP code:
With an ODBC association, you can interface with any database, on any PC in your system, up to an ODBC association is available.
An ODBC Connection to a MS Access Database
Here is the means by which to make an association with a MS Access Database:
- Open the ODBC symbol in your Control Panel.
- Choose the System DSN tab.
- Click on Add in the System DSN tab.
- Select the Microsoft Access Driver. Snap Finish.
- In the following screen, click Select to find the database.
- Give the database a Data Source Name (DSN).
- Click OK.
Note that this design must be done on the PC where your site is found. On the off chance that you are running Personal Web Server (PWS) or then again Internet Information Server (IIS) all alone PC, the guidelines above will work, yet in the event that your site is situated on a remote server, you need to have physical access to that server, or ask your web host to do this for you.