The SourcePro DB examples require special attention due to the complexity of establishing a connection to a database.
SourcePro DB provides a set of examples that illustrate how to transfer data from a relational database into a client program and back again. The examples are:
SourcePro DB video rental store tutorials
Bulk operation example
You can also use these short, simple examples to cut-and-paste into your own database-enabled applications. See the DB Interface Module User's Guide for more information about the examples.
The SourcePro C++ Evaluation Edition includes several access modules, as shown in the table below. Since SourcePro DB provides a consistent API across all supported databases, all access modules use the same examples, located in the <buildspace>\examples\dbcore directory.
Module | Mnemonic (module) |
DB Access Module for ODBC | odbc |
DB Access Module for Microsoft SQL Server | mssql |
DB Access Module for MySQL Server | mysql |
DB Access Module for Oracle OCI (only 10g) | oraoci |
DB Access Module for PostgreSQL Server | pgs |
Makefiles for the examples are located in the directories named as follows:
<buildspace>\examples\<module>\12d
where <module> corresponds to your database (odbc, mssql, mysql, oraoci, or pgs).
To build and run the SourcePro DB examples:
Ensure that your database client software has been installed and that you can connect to your database, as specified in Section 1.3, "Software Requirements."
Modify the tutorial configuration file tutdefs.h to reference your database server.
Build the tutorials and the bulkcopy example.
To run the SourcePro DB video store tutorials:
Run tutsetup.exe to create all dependent database objects.
Run the individual tutorial programs.
Run tutclean.exe to clean up all the tables the tutorials create and use.
To run the bulkcopy example, run bulkcopy.exe.
The following sections describe these steps in more detail.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.