Modifying Files for Database Connection
The examples use include files with hard-coded values for database name, database server, database user name and database user password. You must change these values to reflect your own organizational settings.
The file <buildspace>\examples\<package-name>\12d\tutdefs.h contains configuration variables used by the examples. Modify this file with values for your own database connection.
Modify this file as follows:
*Do not change DBSERVER_TYPE.
*Change DBSERVER_NAME to the name of your database server.
*Change DBUSER_NAME and DBPASSWORD to a valid user name and password for your database; the user account must have permission to create tables on the database in order to run the tutorials.
*If your database requires it, specify the database name using DBDATABASE_NAME.
*If your database requires it, specify the property string using DBDATABASE_PSTRING. Please refer to the Access Module Reference Guide of the access module you are using for the contents of the property string.
For example, your configuration file might look like this:
 
#define DBSERVER_TYPE "msq<lib-ver>12d.dll"
#define DBSERVER_NAME "DataSource"
#define DBUSER_NAME "username"
#define DBPASSWORD "password"
#define DBDATABASE_NAME "database"
#define DBDATABASE_PSTRING ""
NOTE: These values are compiled into the tutorials when you build them. If you need to change the values at a later time, you must clean the example object files with an nmake clean, then rebuild the tutorials. (See Building the DB Examples.)