Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Subject: Reconnect option in mysql

Subject: Reconnect option in mysql

2007-03-21       - By Tim Lucia

 Back
Reply:     1     2  


> -- --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)