求助,关于ADODB.Field 错误 '800a0bcd' BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除

free2035 2011-10-09 10:11:22
ADODB.Field 错误 '800a0bcd'

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

。。/Include/Function.asp,行 5070

行5070附近代码如下:

Function DomainReNew(ByVal Grade, ByVal ProdCode, ByVal DomainName, ByRef Price)
Dim tRs
Call DomainChking(DomainName, TDoType, DomainType)
If Len(Grade) = 0 Then Grade = "1"
Set tRs = Server.CreateObject("Adodb.RecordSet")
Sql = "select * from [domain_list] where grade='" & Grade & "'"
If AutoHostDB Then Sql = Sql & " and prodcode is null" Else Sql = Sql & " and len(prodcode & '')=0"
tRs.Open Sql, Conn, 1, 1
If tRs.EOF And tRs.BOF Then Response.Redirect ("error.asp?id=003")
Price = tRs("Domain_" & TDoType & "_price_renew")
tRs.Close
If Len(ProdCode) > 0 Then
Sql = "select * from [domain_list] where grade='" & Grade & "' and ProdCode=" & Int(ProdCode)
tRs.Open Sql, Conn, 1, 1
If Not (tRs.EOF And tRs.BOF) Then
If Len(tRs("Domain_" & TDoType & "_price_renew") & "") > 0 Then Price = tRs("Domain_" & TDoType & "_price_renew")
End If
tRs.Close
End If
If Len(Session("id")) > 0 Then
Sql = "select * from [user_price] where userid=" & Session("id") & " and protype='domain'"
tRs.Open Sql, Conn, 1, 1
If Not (tRs.EOF And tRs.BOF) Then
Do While Not tRs.EOF
If LCase(tRs("ProName")) = LCase("Domain_" & TDoType & "_price_renew") Then Price = tRs("Price")
tRs.MoveNext
Loop
End If
tRs.Close
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 prodcode is null" 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

标红色的是5070行代码

求助下大家,什么问题,我该怎么操作呢
...全文
243 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Tks_King 2011-10-10
  • 打赏
  • 举报
回复
学习。
free2035 2011-10-10
  • 打赏
  • 举报
回复
这个出现点错误,按照hookee的写法,点 连接后提示权限不足!
free2035 2011-10-09
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 hookee 的回复:]
没相关记录 , 先做一个判断

VBScript code

tRs.Open Sql, Conn, 1, 1
If (tRs.BOF And tRs.BOF) Then
Response.Write "无记录" & Sql
Else
tmpUserPrice = tRs("Domain_" & TDoType & "_price_renew")
……
[/Quote]

我试下,感谢啊
hookee 2011-10-09
  • 打赏
  • 举报
回复
没相关记录 , 先做一个判断

tRs.Open Sql, Conn, 1, 1
If (tRs.BOF And tRs.BOF) Then
Response.Write "无记录" & Sql
Else
tmpUserPrice = tRs("Domain_" & TDoType & "_price_renew")
If Price < tmpUserPrice Then Price = tmpUserPrice
End If

28,391

社区成员

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

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