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

Table of Contents

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

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

The examples cover:

The examples in this document are only code snippets, not complete programs. The code 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 examples in the examples/ directory include: