In my application, I have queries being executed on 15 second intervals,
using mysql_ping prior to sending the queries to make sure I'm still
connected (using a persistant connection). However, if I unplug my cat5 to
simulate losing my internet connection while the application is running,
instead of skipping the query gracefully, Windows reports that
libmysql.dllhas crashed.
This area of code looks something like this:
if(connection == NULL)
return false;
if(mysql_ping(connection) != 0)
return false;
if(mysql_query(connection,query) != 0) { // query failed
} else { // execute the query
}
--
Adam