Simple Learning Note about MySQL++
1. the basic usage pattern
Mysql++ actually doesn’t work all that differently than other database access APIs. The usage pattern looks like this:
1. Open the connection
2. Form and execute the query
3. If successful, iterate through the result set
4. Else, deal with errors
Each of these steps corresponds to a Mysql++ class or class hierarchy.
2. Overview
2.1 The Connection Object
A Connection object manages the connection to the MySQL server. You need at least one of these objects to do anything. Because the other MySQL++ objects your program will use often depend (at least indirectly) on the Connection instance, the Connection object needs to live at least as long as all other MySQL++ objects in your program.
2.2 The Query Object
Most often, you create SQL queries using a Query object created by the Connection object.
Query acts as a standard C++ output stream, so you can write data to it like you would