PDA

Click to See Complete Forum and Search --> : help for ado


qassim
Mar 20th, 2000, 04:31 PM
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

Chris
Mar 20th, 2000, 11:54 PM
you need to put the square bracket like...

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