6 messages in com.mysql.lists.win32Re: connection issue| From | Sent On | Attachments |
|---|---|---|
| Mark Mchugh | 26 Jul 2005 02:58 | |
| Daniel da Veiga | 26 Jul 2005 06:52 | |
| J.R. Bullington | 26 Jul 2005 07:07 | |
| Daniel da Veiga | 26 Jul 2005 07:16 | |
| PF: MySQL | 26 Jul 2005 07:22 | |
| Mike Hillyer | 26 Jul 2005 07:30 |
| Subject: | Re: connection issue![]() |
|---|---|
| From: | Daniel da Veiga (dani...@gmail.com) |
| Date: | 07/26/2005 06:52:22 AM |
| List: | com.mysql.lists.win32 |
I use two functions, both public, one for open and one for close the connection, and call them just before any db operation, I guess this is safer. Setting the interactive timeout is the other way to do it.
On 7/26/05, Mark Mchugh <mark...@yahoo.com> wrote:
Hi, I am using the following connection, which i use when my application starts
Set connMySQL = New ADODB.Connection connMySQL.ConnectionString = "DRIVER={mySQL ODBC 3.51 Driver};" _ & "SERVER=192.168.0.55;" _ & "DATABASE=test;" _ & "UID=root;" _ & "PWD=;" _ & "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384
connMySQL.CursorLocation = adUseClient
connMySQL.Open
and then in any other form, i use this to access the datebase
Set rs = New ADODB.Recordset rs.ActiveConnection = connMySQL rs.Open sqlstr, connMySQL, adOpenStatic, adLockOptimistic
so, for example, if i start my application, and leave it running for a while ( doing nothing ) and then try use a funtion to access the database, it does not work. I presume this is because the connection has timed out?
is there a better way of handling this? i dont think its wize just in increase the timeout on the database?
thanks
Mark
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
-- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/win32?unsub=dani...@gmail.com
-- Daniel da Veiga Computer Operator - RS - Brazil




