Re: C++ with Visual C++ 2008
It's not C + + is C + + / CLI And column [x] is a memory pointer, so it will be difficult to guess how to convert Otherwise you'd better to use mysql + +, it's much more convenient.
Re: C++ with Visual C++ 2008
if we explain how to use mysql + + with Visual C + + 2008 Express because I can not ... I am on Win XP, I installed mysql 5.1 and I have mysql + + 3.0.9.
Re: C++ with Visual C++ 2008
Code:
mysqlpp:: Connection connection (false);
if (connection.connect ( "stock", "localhost", "root", ""))
(
mysqlpp:: StoreQueryResult result;
mysqlpp:: Query query;
int id = 2;
query << "SELECT a, b, c FROM suppliers WHERE id =% 0q";
q.parse ();
result = q.store (id);
if (result)
(
for (mysqlpp:: StoreQueryResult:: iterator it = result.begin (); it! result.end = (); + + it)
(
mysqlpp:: Row & row = const * it;
std:: string a = row [0];
float b = row [1];
int c = row [2];
/ / ..
)
)
)