Hey all,
Using SSQLS I recently started having problems reading one particular value.
This is the defintion of the SSQLS in BrixClass.h
sql_create_7(BrixClass, 1, 7,
mysqlpp::sql_int_unsigned, id,
mysqlpp::sql_int_unsigned, centroid,
mysqlpp::sql_double, threshold)
and I read in the structures like
// with initiliazed con (mysqlpp::Connection object)
mysqlpp::Query query = con->query();
query << "SELECT Centroid, ClassID, Threshold FROM Class WHERE ClassID = 5";
vector<BrixClass> classes;
query.storein(classes);
// take the first element
BrixClass class = classes[0];
then, class.id will always be 0, while the other elements (centroid and threshold)
are properly set.
No matter how I turn around the order in the SELECT, the id will always be zero.
However, when I read the row without SSQLS but instead use mysqlpp::Row
I get correct values.
Any idea?
Thanks,
Peter