Chapter 7 Getting Started with Connector/C++: Usage Examples

Table of Contents

7.1 Connecting to MySQL
7.2 Running a Simple Query
7.3 Fetching Results
7.4 Using Prepared Statements
7.5 Complete Example 1
7.6 Complete Example 2

Source distributions of Connector/C++ include an examples directory that contains usage examples that explain how to use the following classes:

The examples cover:

Several examples in this document are only code snippets, not complete programs. These snippets provide a brief overview on the API. For complete programs, check the examples directory of your Connector/C++ installation Please also read the README file in that directory. To test the example code, edit the examples.h file in the examples directory to add your connection information, then rebuild the code by issuing a make command.

The example programs in the examples directory include: