22,294
社区成员
发帖
与我相关
我的任务
分享
Set rst = New ADODB.Recordset
''如果是静态打开(在客户端内存中生成副本则将游标类型设置为客户端游标)
If cursorType = adOpenStatic Then
rst.CursorLocation = adUseClient
End If
cn.Close
SQL = "Select * from Card where CardID=4"'''cardid是主键、自增长标识,现在card表中有几十条记录。
cn.ConnectionString = "...."
cn.Open
rst.Open Trim$(SQL), cn, cursorType, adLockOptimistic
msgstring = "查询到" & rst.RecordCount & " 条记录"