C++ Client: connect to MySQL from C++ using MySQL++
I am looking for a good C++ example of a simple MySQL client program written in C++ and runs on Linux, using MySQL++ libraries that does the following (no threading):
Accessing Option File Contents, ~/.my.cnf, in user home folder to read settings (load_defaults).
Constructing and sending the sql statement that return result set in away I can get the result row by row from the server (mysql_use_result). Rather than getting whole result set and storing in memory on the client side.
Catching MySQL errors
All of this is type of work is done in C by Paul DuBois, in the book MySQL. There is the sample chapter 6: http://www.kitebird.com/mysql-book/ch06-3ed.pdf that does the explanation. C code there only support MySQL 5 not MySQL 6. I have tried this way and hit wall. C support for MySQL is very limited on the web.
Now I am looking for C++ option. I am new to C++ and my C is rusty.
jobs
Junior Poster in Training
58 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
would you starighten your question? Do you need to get started to C++ and MySQL or MySQL++ wrapper? In case of the first you have at least three choices: MySQL Connector C++, MySQL++ or Pocco libraries with ODBC. For the latter, what do you want specifically?
evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392