The ASP Database Access component uses ActiveX Data Objects (ADO) to
provide easy access to information stored in a database (or in another
tabular data structure such as a spreadsheet) that complies with the Open
Database Connectivity (ODBC) standard. You can extract data by using the
SQL SELECT statement and create an HTML table to display the results.
Before accessing a database by using the Database access component,
you must configure the database by using the ODBC applet in the Windows
Control Panel:
- Open the Control Panel on the Windows PC running your webserver.
- Double-click the ODBC/ODBC Data Sources icon and then switch to System
DSN Tab.
NOTE: The System DSN stores information
about how to access your database. The System DSN is available to all
users of your computer while the User DSN is available only to you,
and the File DSN can be shared by users who have the same database drivers
installed.
- Click the Add button and choose the Microsoft Access Driver then click
the Finish button.
- In the Data Source Name input box, type "studentdatabase".
- In the Database area, Click the Select button. Select the studentreg.mdb
database file located in [d:][\iasp]\samples\database.
NOTE:[d:][\iasp] indicates the destination
drive and directory where the Instant ASP is installed.
- Click the OK button in the Select Database dialog box.
- Finally, click the OK button in the ODBC Microsoft Access Setup dialog
box to finish data source configuration.
- Click the OK button to close the ODBC/ODBC Data Source Administrator
dialog box.
|