Results 1 to 2 of 2

Thread: help for ado

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    karachi
    Posts
    90
    hello
    i am using this code for connection and open
    recordset it is working with nwind's customer,
    category table when i am using order detail table
    it giving me the error is that
    invalid sql statement expected
    add update delete


    Dim conn As Connection
    Dim rs As Recordset
    Dim strsql As String
    Dim connstr As String
    Private Sub Form_Load()
    Set conn = New ADODB.Connection
    Set rs = New ADODB.Recordset

    connstr = "Provider=Microsoft.Jet.OLEDB.3.51;" _
    & "Data Source=C:\nwind.mdb"
    conn.Open connstr
    txtid=rs!orderid and so on

    rs.Open "ORDER DETAILS", connstr

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    you need to put the square bracket like...

    rs.Open "[ORDER DETAILS]", Conn, adOpenKeyset, adLockOptimistic

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