recordset怎样移动指针的位置?

stanely 2001-12-25 02:33:09
myrecordset.move(n)??

另外,recordset的eof是不是他的最后一条记录呢?
...全文
130 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
win1st 2001-12-26
  • 打赏
  • 举报
回复
抱歉,请把上面的逗号换成半角的
win1st 2001-12-26
  • 打赏
  • 举报
回复
getrec1.open "select * from table1 order by id ",conn2,adopenforwardonly,1,adcmdtext
把这个改改。你打开的只能向前移动的游标,不行啦!
这样来:getrec1.open "select * from table1 order by id ",conn2,1,1,1
flyzhen 2001-12-25
  • 打赏
  • 举报
回复
Recordset.move的语法规则事;
Recordset.move count,start
count ----> 移动的相对量;
start ----> 移动的起始位置。
iflycat 2001-12-25
  • 打赏
  • 举报
回复
用循环吧 movenext 几次就行了 这样是最保险的办法 其他的可能跟你的记录集打开方式有关 :)
iflycat 2001-12-25
  • 打赏
  • 举报
回复
eof 目前数据记录是否移过了作后一条
bof 目前数据记录是否移过了第一条

移动纪录的时候使用 rs.movenext 的形式,其中 rs 是你定义的 recordset 实例,其他还有 moveprevious movefirst movelast absoluteposition=N 等形式

另外在建立 recordset 对象的时候,要注意 recordset 类型和锁定类型,分别确定记录集移动方式和存取方式
win1st 2001-12-25
  • 打赏
  • 举报
回复
move(numrecords,star)
还有
movenext
moveprevious
movefirst
movelast
stanely 2001-12-25
  • 打赏
  • 举报
回复
to:beyond_xiruo(希偌) 
你说的好象不行呀
stanely 2001-12-25
  • 打赏
  • 举报
回复
是不是和我打开数据库的方式有关呢?
stanely 2001-12-25
  • 打赏
  • 举报
回复
?
stanely 2001-12-25
  • 打赏
  • 举报
回复
getrec1.move(10)

错误类型:
ADODB.Recordset (0x800A0BCD)
/adminmain.asp, 第 62 行
希偌 2001-12-25
  • 打赏
  • 举报
回复
getrec1.absolutepage
是分页显示的页数
不如用
getrec1.move(n)
stanely 2001-12-25
  • 打赏
  • 举报
回复
to:iflycat(猫)
我用了getrec1.open "select * from table1 order by id ",conn2,adopenforwardonly,1,adcmdtext

然后用getrec1.absolutepage=10的时候。说

错误类型:
ADODB.Recordset (0x800A0BB9)

我的recordset里面纪录有30多条

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧