Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

unsuccessful queries and lost connection

From: Albert Sanchez <ouferrat(at)gmail.com>
Date: Wed Jul 25 2007 - 04:15:51 EDT


Hi all,

I'm programming a piece of software that continuously looks up if it has pending sql queries (UPDATE and INSERT) and executes them. I should also control if I lost the db connection or if a sql query was unsuccessful.

My question is:

in what circumstances could I lose the connection to the db and how would I realize it?

I have found in the refman a mysqlpp::BadQuery class.

Just something like this?

try {

    mysqlpp::Query sqlQuery = sqlConn.query();     sqlQuery << q;
} catch(mysqlpp::BadQuery ex) {

Do you need help?X

}

Is there a better way to deal with errors?

I only want to know if it occurred an error, I am not interested in other stats or results.

Thanks in advance,
Albert Received on Wed Jul 25 04:16:14 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:28:33 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library