Register the New Database with ODBC

You will register the new database with the ODBC data source name “Student Registration.” This data source name (DSN) is referred to by the Enroll application. You must register the database even if you are using the pre-built StdReg32.mdb Microsoft Access database file.

You can register the data source by using ODBC Administrator from the Control Panel, or by running StdReg.exe.

Note   The STDREG tool is provided for use with this tutorial as a convenient method for registering data sources with ODBC and for populating databases with the appropriate tables and data. Normally, you will use ODBC Administrator from the Control Panel to register your data sources with the appropriate tables and data if you are not going to use the pre-built StdReg32.mdb database.

The following two procedures describe how to register the data source if you are using the Microsoft Access ODBC driver.

To register the data source by using ODBC

  1. Open Control Panel, and double-click the 32bit ODBC icon.

  2. Click the User DSN tab, if it is not already selected.

  3. Click the Add button.

    The Create New Data Source dialog box appears.

  4. From the list, choose the driver you want to use with your database, in this case, Microsoft Access Driver (*.mdb), and then click Finish.

    The ODBC Setup dialog box specific to the driver you indicated appears.

  5. In the Data Source Name box, type Student Registration.

  6. Optionally, in the Description box, enter a description for the database.

  7. In the Database group box, click Select, and then navigate to the location of StdReg32.mdb.

  8. Click OK to select the database.

  9. Click OK to exit the ODBC Setup dialog box, and click Close to exit the ODBC Data Source Administrator dialog box.

To register the data source by using StdReg.exe

  1. First run StdReg.exe, by using the following procedure:
  2. Navigate to the location of StdReg.exe, and double-click to run the program.

  3. Click Add Data Source.

  4. Follow the instructions in steps 3 through 9 of the previous procedure.