server went away error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • n8kindt
    New Member
    • Mar 2008
    • 221

    server went away error

    hi guys, i'm hoping you can help me resolve a problem i have with my odbc connection. here is the error message i'm getting:


    i am posting the detailed question in the Access forum. in order to keep all the replies in one thread, here's the link: http://bytes.com/forum/thread800283.html
  • n8kindt
    New Member
    • Mar 2008
    • 221

    #2
    i still am struggling with this one. although i'm starting to lose hope that i can do anything about it. can anyone help? thank you.

    Comment

    • n8kindt
      New Member
      • Mar 2008
      • 221

      #3
      ok, i think i finally got it! i found a way to ping the server. hopefully i don't jinx myself again, but i think this is working!

      Code:
      Public Sub PingMySQL()
      	
      	Shell "ping 127.0.0.1 -t", vbHide
      
      End Sub
      i got the code from HERE. it was a big help and there are some additional tips on how to ping servers from vba

      Comment

      • n8kindt
        New Member
        • Mar 2008
        • 221

        #4
        this is getting ridiculous. the above "solution" obviously didn't work because i needed to send a ping command to the actual mysql server--not just the server itself. here's the code for doing just that:

        when using vba (or visual basic, etc) there is a dll that can be downloaded HERE

        Code:
        Public Sub Ping_MySQL()
        
        On Error GoTo PingError
         Set GCnn = New MYSQL_CONNECTION
            GCnn.OpenConnection "xx.xxx.xx.xx", "your db name", "your password", "user name"
            If GCnn.State = MY_CONN_OPEN Then
            GCnn.ping
            Debug.Print "connection successfully pinged " & Now()
            Else: Debug.Print "ping command unavailable"
            End If
        Set GCnn = Nothing
        Exit Sub
        PingError:
        Debug.Print "ping error"
        Exit Sub
        End Sub
        
        'if u're using this code, don't forget to add the VBAMySQL.dll in your references
        BUT

        the problem still remains. i'm not sure if the problem is b/c i'm using an odbc connection and pinging it using a different method. i thought it would work since the ping command was coming from the same ip address. there have been a few times where i've been able to restore the connection using that function but others i can call that procedure all i want and it doesn't do any good. the conclusion i'm coming to is there is an additional problem. HELP?

        so... SOS

        i'm running out of time to get this problem fixed. i've looked into populating a continuous form using command lines programmed into the dll--which would be similar to using DAO or ADO but programming a continuous form looks to be very painful if not near impossible since no one else has had the need to do it before. can ANYBODY throw me a lifeline here? i would very much appreciate it.

        Comment

        Working...