金鳞

目标->软件测试架构师

Andy.j.chen  说:

Dim j
Set Conn=CreateObject("ADODB.Connection")
Set Rs = CreateObject("ADODB.Recordset")
Conn.Open "DSN=S7DSQL05;UID=EcomDbo;PWD=Ecom2Dev;APP=QuickTest Professional;WSID=S7DSQL05;DATABASE=SVC2005" Rs.Open "select count(*) FROM dbo.RMAMaster ",Conn
'Rs.PageSize=10
j=Rs.RecordCount
msgbox j

这个返回的怎么总是-1哦

问题解决了 呵呵

Rs.Open "select  TOP 50 RMANumber FROM dbo.RMAMaster ",Conn,3
posted on 2008-06-17 12:50 金鳞 阅读(217) 评论(2)  编辑 收藏 引用 所属分类: QTP

评论

# re: Andy.j.chen的方法,解决count属性返回-1的问题 2008-06-17 12:52 Ego
Note: This property will return -1 for a forward-only cursor; the actual count for a static or keyset cursor; and -1 or the actual count for a dynamic cursor. Note: The Recordset object must be open when calling this property. If this property is not supported it will return -1.   回复  更多评论
  

# re: Andy.j.chen的方法,解决count属性返回-1的问题 2008-06-17 12:53 Ego
Andy.j.chen 说:
http://www.china-askpro.com/msg21/qa32.shtml
  回复  更多评论
  

只有注册用户登录后才能发表评论。