I use ADODC and ADODB together i have got a problem;

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alem
    New Member
    • Dec 2006
    • 38

    I use ADODC and ADODB together i have got a problem;

    Hallo friends!

    like I ask you befor I try to use both the connection but highlite this code

    Call Adodc1.Recordse t.ActiveConnect ion

    I need to open this query by using button click. like usual I need your support please .
    Thank you in advance
    [code=vb]
    Dim cn As New ADODB.connectio n
    Dim rs As New ADODB.Recordset

    Private Sub cmdnext_Click()
    rs.MoveNext
    If rs.BOF Then rs.MoveNext
    rs.EOF = rs.MoveFirst
    MsgBox "go to next record", vbInformation
    Call Adodc1.Recordse t.ActiveConnect ion
    End Sub

    Private Sub cmdshow_Click()
    Set cn = New ADODB.Connectio n
    cn.Provider = "Microsoft.jet. oledb.4.0; "
    cn.Open "C:\HRMS\RT AHR "
    Set rs = New ADODB.Recordset
    rs.Open "select*fro m qryage", cn, adOpenDynamic, adLockOptimisti c
    Show
    Call Adodc1.Recordse t.ActiveConnect ion
    End Sub[/code]
    Last edited by debasisdas; Feb 15 '08, 11:58 AM. Reason: added code=vb tags
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    What is the problem with the code ?

    What type of file is this ?

    C:\HRMS\RTAHR

    Comment

    • alem
      New Member
      • Dec 2006
      • 38

      #3
      hi
      It is the path name let me explain

      c:\HRMS\RTHRMS is the path

      c: drive name
      HRMS is the folder name
      RTAHR is the database name

      Comment

      • lotus18
        Contributor
        • Nov 2007
        • 865

        #4
        Originally posted by alem
        hi
        It is the path name let me explain

        c:\HRMS\RTHRMS is the path

        c: drive name
        HRMS is the folder name
        RTAHR is the database name
        Hi

        You've forgot to add its file extension. (RTAHR ) : )

        Rey Sean

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Originally posted by alem
          hi
          It is the path name let me explain

          c:\HRMS\RTHRMS is the path

          c: drive name
          HRMS is the folder name
          RTAHR is the database name
          What type of database is that ?

          Comment

          Working...