【发布时间】:2015-05-21 11:42:33
【问题描述】:
我的代码是这样的
rst.CursorLocation = adUseClient
Set rst = MySQLConn.Execute("SELECT * FROM " & viewName & ";")
MsgBox rst.RecordCount
我想知道我的记录集中的记录数,但记录数总是返回 -1。我将如何解决这个问题?
【问题讨论】:
-
RecordCount 仅适用于 FetchAll 属性设置为 true 时检索到的 MySqlDataReader。
-
我的 cmets 实际上并不准确,因为它是针对 Mysql 的。检查 bwest 的答案以使用静态光标。