Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot

Links

XODOX
Impressum

#1: DSNless ODBC Connection

Posted on 2011-07-22 17:09:35 by Mauch Chunk Opera House

------=_NextPart_000_006A_01CC485F.D7597980
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

I connect to a MySQL database from Access using a DSN-less connection. What
must I change in the ODBC string in order to keep the connection alive for
more than a minute?



When I set up a DSN on my machine, I just check off the auto-reconnect
feature in the MySQL ODBC Connector, then the connections stay up.



How do I do this using a DSN-less connection string?



Dan Hugos

Mauch Chunk Opera House

Jim Thorpe, PA

www.MauchChunkOperaHouse.com

570-325-2082




------=_NextPart_000_006A_01CC485F.D7597980--

Report this message

#2: Re: DSNless ODBC Connection

Posted on 2011-07-27 14:06:15 by Lawrenty Novitsky

Hi,
I think if you add AUTO_RECONNECT=1 to your connection string - it
should do the job.

lawrin

On 22.07.2011 18:09, Mauch Chunk Opera House wrote:
> I connect to a MySQL database from Access using a DSN-less connection. What
> must I change in the ODBC string in order to keep the connection alive for
> more than a minute?
>
>
>
> When I set up a DSN on my machine, I just check off the auto-reconnect
> feature in the MySQL ODBC Connector, then the connections stay up.
>
>
>
> How do I do this using a DSN-less connection string?
>
>
>
> Dan Hugos
>
> Mauch Chunk Opera House
>
> Jim Thorpe, PA
>
> www.MauchChunkOperaHouse.com
>
> 570-325-2082
>
>
>
>

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

Report this message

#3: Re: DSNless ODBC Connection

Posted on 2011-07-28 14:40:31 by Lawrenty Novitsky

Hi,

I guess I know what is going one.
You have OPTION=35. I think that besides setting required flags, it
resets all other flags - basically it cancels all AUTO_RECONNECT=1. That
is a bug, it has been reported and it is not fixed yet.

So you have to remove AUTO_RECONNECT=1(or you may keep it, it does not
do any harm), and change OPTION=35 to OPTION=4194339, which is 4194304 +
35. or even 4194338, as flag 1 doesn't affect anything in latest driver
versions.

i've returned cc to the list, as that maybe interesting to other people.
i hope you don't mind.

lawrin

On 28.07.2011 15:06, Dan Hugos wrote:
> I do appreciate the thorough info, I will check it out some more.
>
> Here is the string I'm using:
>
> ODBC;DRIVER={MySQL ODBC 5.1
> driver};DESC=;DB=xxx;SERVER=xxxxxx;USER=xxx;PASSWORD=xxx;POR T=3306;SOCKET=;O
> ption=35;AUTO_RECONNECT=1;STMT=;
>
> Do you see anything obvious? When I use the DSN and check off that option,
> it definitely does the job.
>
> I will test it some more and try and figure it out - it certainly does seem
> like it ought to work...
>
> -----Original Message-----
> From: Lawrenty Novitsky [mailto:lawrenty.novitsky@oracle.com]
> Sent: Thursday, July 28, 2011 3:14 AM
> To: Dan Hugos
> Subject: Re: DSNless ODBC Connection
>
> Well, that is actually that happens when you check
>
> auto-reconnect feature
>
> in the DSN dialog - option AUTO_RECONNECT is added to the data source
> settings.
> Unless you use a 3.51 driver. Then you have to add OPTION=4194304(or you
> have to add that number to your current OPTION value). That is
> equivalent of the AUTO_RECONNECT=1, and should work with both 5.1 and
> 3.51 drivers.
>
> lawrin
>
>
> On 27.07.2011 21:04, Dan Hugos wrote:
>> Hmm, didn't seem to do the job. Table connections still timed out in about
>> 60 seconds.
>>
>> -----Original Message-----
>> From: Lawrenty Novitsky [mailto:lawrenty.novitsky@oracle.com]
>> Sent: Wednesday, July 27, 2011 8:06 AM
>> To: Mauch Chunk Opera House
>> Cc: myodbc@lists.mysql.com
>> Subject: Re: DSNless ODBC Connection
>>
>> Hi,
>> I think if you add AUTO_RECONNECT=1 to your connection string - it
>> should do the job.
>>
>> lawrin
>>
>> On 22.07.2011 18:09, Mauch Chunk Opera House wrote:
>>> I connect to a MySQL database from Access using a DSN-less connection.
>> What
>>> must I change in the ODBC string in order to keep the connection alive
> for
>>> more than a minute?
>>>
>>>
>>>
>>> When I set up a DSN on my machine, I just check off the auto-reconnect
>>> feature in the MySQL ODBC Connector, then the connections stay up.
>>>
>>>
>>>
>>> How do I do this using a DSN-less connection string?
>>>
>>>
>>>
>>> Dan Hugos
>>>
>>> Mauch Chunk Opera House
>>>
>>> Jim Thorpe, PA
>>>
>>> www.MauchChunkOperaHouse.com
>>>
>>> 570-325-2082
>>>
>>>
>>>
>>>

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

Report this message