ADODB.Recordsetrst.RecordCount返回值为-1
事情是这样的,我的数据库是SQL SERVER2000
连接代码为:
"Provider=SQLOLEDB.1;Password=asp600;Persist Security Info=True;User ID=sa;Initial Catalog=LABEL;Data Source=172.17.1.21;Connect Timeout=30"
基本代码如下:
Dim rstobj As New ADODB.Recordsetrst
obj.Open cmdObj, , adOpenStatic, adLockOptimistic
但我的rstobj.RecordCount老是返回-1阿(数据库有相应数据),请问各位为什么啊,要怎样解决阿?