Results 1 to 3 of 3

Thread: Lost connection Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    3

    Lost connection Error

    Hello:

    I have a guy who is writing code for me using BVB6.
    Using a SSH tunnel connection to my web host server
    where I have a Mysql database. He is using ADO datagrid
    to show all the records in my database. Allow Deletes is
    set to yes.
    PROBLEM: When I try to delete a record I get a Lost Connection to
    MySQL server during query run-time error '-2147467259 (80004005)'

    He has looked and looked and can't find the problem, saying that
    ADO is not very stable way of doing code. I requested that he use ADO
    so that it is easy for me to add fields to the datagrid.
    --------------------------------------------------------
    Private Sub cmdDelete_Click()
    Dim nresponse

    nresponse = MsgBox("Do you really want to delete this record?", 20,
    "Delete Record")
    If nresponse = 6 Then
    ' Delete the current record
    Adodc3.Recordset.Delete
    ' If the record deleted was the last record, this will update
    the last customer number
    'DatLastCustNo.Refresh
    Adodc3.Refresh
    ' After the current record has been deleted, there is no
    current record. We need to
    ' use a move method to jump to a valid record
    Adodc3.Recordset.MoveFirst

    End If

    End Sub
    -----------------------------------------------------------

    Any help with this problem sure would be appreciated.

    Thanks for your time
    Bill Dannels

  2. #2
    Lively Member
    Join Date
    Apr 2005
    Posts
    91

    Re: Lost connection Error

    Hi,
    I'm not up much on MySql. Try using a server side cursor and check the
    LockType. If that fails the try coding it WithEvents to see where it's falling
    over.

    Fishy.

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Lost connection Error

    Try using ADO code instead of the control....
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width