  | | | Subject: Reconnect option in mysql | Subject: Reconnect option in mysql 2007-03-21 - By Tim Lucia
Back
> -- --Original Message-- -- > From: Avadhut Bhangui [mailto:avadhutbhangui@(protected)] > Sent: Tuesday, March 20, 2007 10:26 AM > To: myodbc@(protected) > Subject: Reconnect option in mysql > > Hi, > > I have a application written in c. I use mysql odbc drivers to > coneect to the mysql database and i m new to this. I am getting the > "mysql server gone away" error. > > After doing google i search i came to know abt the "wait_timeout" > variable...but i would like not to make use of this and instead do > some thing in the code. > > I want to know is thr any function which we can use so that the > reconnect option can be enabled..once i establish my connection at the > beginning.
Connector/ODBC (3.51.13+) has an option:
4194304 Enable auto-reconnect
I've never used it, but I have a pile of ODBC MySQL data sources I use with VB6 and I checked to see if the option was there.
See also: http://dev.mysql.com/doc/refman/5.0/en/myodbc-configuration-connection-param eters.html -- it's not foolproof nor appropriate in all situations.
Tim
> > Also can someone pls tell me if "SQLSetConnectOption" function can > be used to do the same. > > Thanks. > Avadhut. > > > Thanks. > Avadhut U. Bhangui > Mobile: +91-9845376250 > > > > > > > > > -- ---- ---- ---- ---- ---- ----- > Here's a new way to find what you're looking for - Yahoo! Answers
-- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=mysql@(protected)
|
|
 |