|
|||||||||||
|
unsuccessful queries and lost connection
From: Albert Sanchez <ouferrat(at)gmail.com>
Date: Wed Jul 25 2007 - 04:15:51 EDT
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;
} 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,
This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:28:33 EDT |
||||||||||
|
|||||||||||