Reconnect option in mysql

Reconnect option in mysql

am 20.03.2007 15:25:45 von Avadhut Bhangui

--0-685842235-1174400745=:42244
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

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.

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
--0-685842235-1174400745=:42244--

RE: Reconnect option in mysql

am 22.03.2007 03:45:54 von Tim Lucia

> -----Original Message-----
> From: Avadhut Bhangui [mailto:avadhutbhangui@yahoo.co.in]
> Sent: Tuesday, March 20, 2007 10:26 AM
> To: myodbc@lists.mysql.com
> 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=gcdmo-myodbc@m.gmane.org