Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008

    Unanswered: run time error 3709

    Hello all, VB keeps giving me this error code
    'The connection cannot be used to perform this operation. It is either closed or invalid in this context.'

    Private Sub Form_Load()
    Dim pstDoctorSQL As String
    frmDoctors.WindowState = 2
    pstDoctorSQL = "SELECT * FROM tblDoctor " & _
                    "WHERE DocStatus = True " & _
                    "ORDER BY DocNum"
    statement in
    mrsDoctor.Open pstDoctorSQL, gcnTDLabs, adOpenStatic, adLockOptimistic, adCmdText
    If mrsDoctor.RecordCount > 0 Then
        Call DisplayData
    End If
    End Sub
    it doesnt like the line "mrsDoctor.Open pstDoctorSQL, gcnTDLabs, adOpenStatic, adLockOptimistic, adCmdText"

    can someone please help me ?
    Last edited by loquin; 04-10-08 at 17:03. Reason: add [code] [/code] tags for readability.

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    Where have you opened the connection gcnTDLabs ?
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

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