vb调用access出错
Dim StrId As String
Dim StrFirstName As String
Dim TmpStr As String
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim strSql As String
strSql = "select * from [second]"
TmpStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\桌面\first.mdb;Persist Security Info=False;"
Con.ConnectionString = TmpStr
Con.CursorLocation = adUseClient
Con.Open
Rs.CursorType = adOpenKeyset
Rs.LockType = adLockOptimistic
Rs.Open strSql, Con, adOpenKeyset, adLockPessimistic
StrId = Trim(InputBox("请输入职员代码:"))
StrFirstName = Trim(InputBox("请输入姓"))
Rs.AddNew
Rs!NumOfSection = StrId
Rs!NumOfOil = StrFirstName
Rs.Update
Rs.Close
Con.Close
老是提示我from子句语法错误,请高手指点