[asynchronous loving] ADODB.Field 错误 '80020009'

8 views
Skip to first unread message

asyn

unread,
May 22, 2007, 10:10:02 PM5/22/07
to asynl...@googlegroups.com

刚启动iis,打开一个网页,却出现了错误,久违的经典错误,如下:

ADODB.Field 错误 '80020009'

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

/wwwroot/pinglun/pl_list.asp,行 0


原因分析: 使用记录集前没有判断指针状态,即记录集open后直接读取数据造成的。

解决办法: 记录集open后,加先判断rs的EOF和BOF属性,添加not rs.eof and not rs.bof或者直接用not rs.eof。


--
由 asyn 于 5/23/2007 09:48:00 上午 在 asynchronous loving 上发表
Reply all
Reply to author
Forward
0 new messages