Adodc1.CursorType = adOpenDynamic
Adodc1.CursorType = adOpenKeyset
Adodc1.CursorType = adOpenStatic
Adodc1.LockType = adLockBatchOptimistic
Adodc1.LockType = adLockOptimistic
Adodc1.LockType = adLockPessimistic
Adodc1.LockType = adLockReadOnly
这些属性怎样配何起来用啊.
If Adodc8.Recordset.RecordCount <> 0 Then
Adodc9.Refresh
Adodc8.Recordset.MoveFirst
For n = 1 To Adodc8.Recordset.RecordCount
If Adodc8.Recordset.Fields("移去") = True Then
For i = 1 To Adodc9.Recordset.RecordCount
If Adodc9.Recordset.Fields("音像编号") = Adodc8.Recordset.Fields("音像编号") And Adodc9.Recordset.Fields("小号") = Adodc8.Recordset.Fields("小号") Then
Adodc9.Recordset.Fields("借出状态") = False
Adodc9.Recordset.Update
End If
Next
End If
Adodc8.Recordset.MoveNext
Next
Adodc8.Recordset.MoveFirst
For n = 1 To Adodc8.Recordset.RecordCount
If Adodc8.Recordset.Fields("移去") = True Then
Adodc8.Recordset.Delete
End If
If Not Adodc8.Recordset.EOF Then
Adodc8.Recordset.MoveNext
End If
Next
End If
Set DataGrid3.DataSource = Adodc8
如果设置好上面的几个属性就不会现现错误提示,但我用了Adodc1.CursorType = adOpenKeyset和Adodc1.LockType = adLockBatchOptimistic就没事.可是他只是在表格里显示很好,删除什么就消失什么,但是后台的数据库还是存在呀.请问这些属性怎么搭配用????