How to bind data using C++ and MySQL?
Hi, I'd like to know what would be an efficient method for me to copy data from the MySQL DB to my C++ application. I need a method that will retrieve type information from each of the DB's fields, so that I can arrange them correctly, int with int, double with double, string with string and thus feed the data into my classes. I can already connect to the DB and even make queries, but I think the queries return strings or chars and I was wondering if I'd have to create algorithms to convert the queries into appropriate formats or if there is an easier way.
Here's the code, it's very short and hosted on codepad:
CApp.h:
http://codepad.org/AIQQUET3
CApp.cpp:
http://codepad.org/hwtVP7pC
I have no clue as how to convert the query result into int's, char's, double's, etc...
Any help is greatly appreciated!
Thanks in advance!
Subject
Views
Written By
Posted
How to bind data using C++ and MySQL?
1629
March 08, 2011 07:52AM
740
March 17, 2011 12:39AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.