List:MySQL++« Previous MessageNext Message »
From:Sunil Khatri Date:January 6 2010 7:41pm
Subject:Connection::ping problem on RHEL5
View as plain text  
Hi All,
I am facing a problem with Connection::ping method on (mysql++-3.0.8)RHEL5.
Please see the following code snippet:

#include <mysql++.h>
int main()
    mysqlpp::Connection conn(false);
    while(!conn.connect("dbname","", "userme", "mypasswd")){
        puts("Unable to connect ...");
    bool b =;
    printf("ping status = %d\n", b);
    mysqlpp::Query q = conn.query();
    q<<"Select * from test_tab";
    mysqlpp::StoreQueryResult r =;
    printf("name=%s\n", r[0]["name"].c_str());
    b =;
    printf("next ping status= %d\n", b);

Here before executing query I am checking the status using ping which is
returning true. But after executing query when I again checks the status its
returning false and if I execute one more query in after this its also
getting executed successfully. We are not facing this problem on RHEL4.

Any suggestions are greatly appreciated !
Best Regards
Sunil Khatri

Connection::ping problem on RHEL5Sunil Khatri6 Jan
  • Re: Connection::ping problem on RHEL5Warren Young7 Jan