RE: Reconnect option in mysql

"Tim Lucia" <[email protected]>
Newsgroups gmane.comp.db.mysql.odbc
Message-ID <022a01c76c2c$37b2e420$0201a8c0@timlap>
> -----Original Message-----
> From: Avadhut Bhangui [mailto:[email protected]]
> Sent: Tuesday, March 20, 2007 10:26 AM
> To: [email 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/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.