刚才删除的那条记录有时候会还在,需要再点击一次或者几次这个按钮才能刷新过来
删除是这种情况,如果用语句修改某个记录以后也会有这种情况
解决:
换ADO方式试试 '引用Micrsoft Active Data Object 2.6 Library '删除记录 Dim cnn As New ADODB.Connection Dim rs As New ADODB.Recordset cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Persist Security Info=False;" & "Data Source = E:/db1.mdb;" & _ "mode=ReadWrite" cnn.Open strMysqL = "DELETE 某个记录 FROM 某个表 WHERE 条件" cnn.Execute strMysqL cnn.Close '刷新记录 Dim cnn As New ADODB.Connection Dim rs As New ADODB.Recordset cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Persist Security Info=False;" & "Data Source = E:/db1.mdb;" & _ "mode=ReadWrite" cnn.Open strMysqL = "SELECT * FROM 某个表" rs.Open strMysqL,cnn,adOpenKeyset,adLockOptimistic MSFlexGrid1.TextMatrix(1,1) = rs(0)