请帮忙看看下面这个ADODB.Field 错误 '800a0bcd' 是什么错,麻烦把正确代码贴出来,谢谢

gaochao217 2012-05-19 10:10:30
ADODB.Field 错误 '800a0bcd'

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

E:\WWWROOT\TESTTEST\WEB\MANAGER\../Include/Function.asp,行 5071


代码如下:
Sql = "select * from [domain_list] where Grade='5'"
If Len(ProdCode) > 0 Then
Sql = Sql & " and prodcode=" & ProdCode
Else
If AutoHostDB Then Sql = Sql & " and " & SnullLen("prodcode", 0) Else Sql = Sql & " and len(prodcode & '')=0"
End If
tRs.Open Sql, Conn, 1, 1
tmpUserPrice = tRs("Domain_" & TDoType & "_price_renew")
If Price < tmpUserPrice Then Price = tmpUserPrice
End If
Set tRs = Nothing
End Function
...全文
83 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
gaochao217 2012-05-20
  • 打赏
  • 举报
回复
高手请赐教,还是搞不定
hookee 2012-05-19
  • 打赏
  • 举报
回复
1. 使用记录集之前判断一下有没有记录
2. Sql 显示出来,到数据库环境下查询一下看看结果

tRs.Open Sql, Conn, 1, 1
If tRS.EOF And tRS.BOF Then
Response.Write "未查到记录:" & Sql
Else
tmpUserPrice = tRs("Domain_" & TDoType & "_price_renew")
If Price < tmpUserPrice Then Price = tmpUserPrice
End If
tRs.Close
Set tRs = Nothing

2,100

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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