asfman
android developer
posts - 90,  comments - 213,  trackbacks - 0
当直接使用ActiveConnection的Execute时需要设置CursorLocation=3客户端游标,否这RecordCoun返回-1

当使用rs.Open(),只要设置CusorType=1 然后设置LockType=3就通用了
,如果不设置CusorType结果就会返回-1。所以通用设置为:
CursorType=1;
LockType=3;
CursorLocation=2//默认也是2 ,所设置不设置无所谓
var sql = "select * from messages order by id desc";
var Rs= Server.CreateObject("ADOR.RecordSet");
Rs.ActiveConnection=DH.ConnStr;
Rs.CursorType = 1;
Rs.LockType = 3;
//Rs.CursorLocation = 2;
Rs.Source = sql;
Rs.Open();
Response.Write(Rs.CursorType+"<br>");
Response.Write(Rs.LockType+"<br>");
Response.Write(Rs.CursorLocation+"<br>");
Response.Write(Rs.RecordCount);
posted on 2007-11-08 09:00 汪杰 阅读(290) 评论(0)  编辑 收藏 引用 所属分类: asp(javascrpt)
只有注册用户登录后才能发表评论。

<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(15)

随笔分类(1)

随笔档案(90)

文章分类(727)

文章档案(712)

相册

收藏夹

http://blog.csdn.net/prodigynonsense

友情链接

最新随笔

搜索

  •  

积分与排名

  • 积分 - 457616
  • 排名 - 6

最新随笔

最新评论

阅读排行榜

评论排行榜