Register a Database

Use the ODBC Data Source Administrator to register the stdreg32.mdb database file as Student Registration. Add a CRecordset Derived Class uses this data source, so you’ll need to register this data source before continuing with the tutorial.

Note: This section gives you step by step instructions. If you don’t need the details, skip this section.

1.  Locate the stdreg32.mdb file in the <stingray_installdir>\Samples\Grid\Database folder. Make sure your copy of stdreg.mdb is not read-only.

2. If Windows 2000 is your operating system, start the ODBC Data Source Administrator by double-clicking the Data Sources (ODBC) icon in the Control Panel\Administrative Tools.

If your machine is running a different OS, you may need to search around a bit to locate the icon for the ODBC Data Source Administrator.

3. Click the tab corresponding to the category of data source you want to register. For example, choose the System DSN tab if the data source should be visible to all users on the machine including NT services. User Data Source, System Data Source, and File Data Source show the difference between the different categories of ODBC data sources.

User Data Source

System Data Source

File Data Source

System DSN Tab

4. Click the Add button.

Creating a new data source

5. Select the driver that corresponds to Access (*.mdb).

6. Click Finish.

7. In the ODBC Microsoft Access Setup dialog, type Student Registration as the Data Source Name. (You don’t need to add a description.)

Naming the Data Source

 

8. Click Select.

9. Navigate to the samples\grid\tutorial folder and select the name of the database (stdreg32.mdb).

Selecting the Database

10. Click OK.

11. Make sure the Student Registration database shows up correctly.

Database has been correctly registered

12. Click OK.