PV> after I've connected with mysql (4.1.12) I need to know some info like
PV> I've tried with Connection->info() but the result is always "...";
PV> How can I obtain this information with mysql++?
you can use the piece of code like this for that puproses:
con_this.connect( "", "localhost", "root", "" );
Query query_this = con_this.query();
query_this << "SHOW GLOBAL VARIABLES";
Result res_this = query_this.store();
for( i_this = res_this.begin(); i_this < res_this.end(); i_this++ )
row_this = *i_this;
std::string var_name = (std::string)row_this.at(0);
if( var_name == "character_set" )
// !!! here do something with obtained value
just note, that this code compiled against 2.0.7 and you may need to
change syntax a bit (I'm changed it once move from 1.7.4 to 2.0.7, not
sure if reverse changes is required).
this code also may be used for "datadir" variable quering (that
question appeared on list approximately two monthes ago).