I have a problem getting the example programs to run correctly. In particular,
---
[lance@ll examples]$ ./sinisa_ex
3.23.24-beta
Error: You have an error in your SQL syntax near ';/charsets/Index' at line 1 1064
---
It correctly shows the output of con.get_client_info(), but then the
query << "show databases" fails. Does it need a terminating semicolon
or a newline or a flush?
Also, simple1.cc runs fine (after the simple modification of changing
the select_database call to my database and the query to my table):
---
...
con.select_database("mysql_cpp_data");
mysqlcppapi::Query query = con.create_Query();
query << "select * from stock";
...
[lance@ll examples]$ ./simple2
Query: select * from media
Records Found: 767
...
---
but when the query object is loaded again:
---
...
con.select_database("mysql_cpp_data");
mysqlcppapi::Query query = con.create_Query();
query << "select * from stock";
... for loop, cout ...
#ifdef REPEAT_QUERY
// n simple1.cc after the first query, for loop, and cout
// putting the same string to the same query causes failure
query << "select * from stock";
/*mysqlcppapi::Result_Store*/ res = query.store();
cout << "Query: " << query.preview() << endl;
cout << "Records Found: " << res.size() << endl << endl;
#endif
...
[lance@ll examples]$ ./simple2
Query: select * from media
Records Found: 767
...
Error: You have an error in your SQL syntax near '* from medi
---
Again I wonder if the query needs semicolon termination, a newline,
or a flush. If a new query object is created instead of reusing the
query object used previously, the store succeeds.
I'm using Caldera 2.3 and have the following mysql rpms isntalled:
MySQL-3.22.32-1
MySQL-client-3.22.32-1
MySQL-devel-3.22.32-1
xmysql-1.10-1
And have built, installed, and attempting to run mysqlcppapi-1.7.2a.tar.gz
Help appreciated. Thanks, -Lance.
--
-=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
Lance Welsh la...@se...
Seascape Communications (650) 327-6890
-=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
|