我想知道 当我用recordset对象命令
查看数据库的记录时怎么会显示为-1,当进行一次删除操作时,又恢复正常
我的SQL语句是
Dim xx As ADODB.Recordset
Set xx = conn.Execute("select * from password where mima1=" & "'" & mima & "'")
查看数据库的记录时怎么会显示为-1,当进行一次删除操作时,又恢复正常
我的SQL语句是
Dim xx As ADODB.Recordset
Set xx = conn.Execute("select * from password where mima1=" & "'" & mima & "'")
xx.open "select * from password where mima1=" & "'" & mima & "'",conn,adopenkeyset,adlockreadonly
msgbox xx.recordcount
Set conn = New ADODB.Connection
conn.ConnectionString = connstr
conn.Open
我的CONN没有问题呀
Set xx = conn.Execute("select * from password where mima1=" & "'" & mima & "'")
这个用法返回的是一个受限制的记录集,而且conn.excute还有两个参数你没设置,应该是这里的问题吧Leftie(左手,为人民币服务)的方法是最正确的