ado调用的初级问题

vb+sql

Set rs = cn.Execute(source, numrecs, 1),
当有记录返回时,numercs其值老是为-1.好像不返回数据记录条数
---------------------------------------------------------------

这种写法不是很直观,而且出错时不能捕获
你可以这样写
dim rs as new adodb.recordset
rst.locktype =....
rs.open "select * from ...",cn
debug.print rs.recodercount
.
.
.

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus