CPP2SDL Demo OVERVIEW This example illustrates how CPP2SDL can be used to access a Microsoft Access 97 database through an ODBC interface. Standard Microsoft API calls are used to access the database. The API calls as well as some typedefs used in the calls are declared in the import specification used in the example. This demo is a special verson of the well-known Access Control example, used in many Telelogic courses. THIS DEMO WILL ONLY RUN ON A WINDOWS NT SYSTEM. It is developed and tested on a PC running Windows NT 4.00.1381 and Microsoft Visual C++ 6. An empty Microsoft Access 97 database is shipped together with the demo. Microsoft Access 97 is not required to run the demo. PREPARATION In order to run the demo, an ODBC Interface for the database must be installed using 'ODBC Data Sources' in the Windows NT Control Panel. Perform the following steps to install the Data Source after opening the 'ODBC Data Sources' window: 1. Select the 'User DSN' tag. 2. Click on the 'Add...' button. 3. Select 'Microsoft Access Driver (*.mdb)' and click on the 'Finish' button. 4. In the dialog that pops up, enter 'AccessControl' as Data Source Name. 5. Click the 'Select...' button. 5. Enter the path to the database used in the demo (it is placed in the demo directory and is called Ac.mdb). You now have an ODBC Data Source that the program can connect to. BUILDING THE EXAMPLE When building a simulator for this example, odbc32.lib is needed. Add odbc32.lib to the used libraries by adding it in the 'List of libraries' on the Linker settings tab in Targeting Expert. MISCELLANEOUS DETAILS A program that clears the content of the database, ClearDB.exe, is placed in the demo directory. Running this program deletes the entire content of the database. This program is intended for users not having Microsoft Access 97 installed on their systems. The functionality of the demo is unchanged from the user's point of view, compared to the traditional Access Control example. The difference is that card and code data is stored between sessions.