无效的SQL语句;期待'DELETE'、'INSERT'。。。新手求助
新手正在自学VB6.0,买的书有一些基础问题没有解释清楚,麻烦前辈稍微指点一下这是哪里的问题,跪谢。。Private Sub ComFind_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sql As String
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\编程12.7.21\dingdanchaxun.mdb;"
sql = "seclect * form 订单查询 where 订单号= '" & Text1.Text & "'"
Set rs = New ADODB.Recordset
rs.Open sql, cn, adOpenForwardOnly, adLockBatchOptimistic ==========================就是这一行出问题。
Set MSHFlexGridl.Recordset = rs
MSHFlexGridl.Refresh
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
End Sub