今天遇到一个问题,有下面的代码(VB)
Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset
Dim score As Double score = 0
conn.Open "PROVIDER=Microsoft.jet.OLEDB.4.0;data source=" & FileName.Text
sql = "SELECT * FROM ecans WHERE stuid='" & id & "'"
rs.Open sql, conn, adOpenKeyset, adLockOptimistic rs("score") = score
rs.Close
|
结果 rs.Close 出现 Run-time error'3219': 在此环境中不允许操作 ,解决的方法是在其前面加上一句
rs.update
阅读(5590) | 评论(0) | 转发(0) |