Sign-up....

asp 连数据库错误报告:缺少 'Loop' 165行

<%

If Len(Rs1("id"))=8 Then

id1=Rs1("id")

Set Rs3 = Server.CreateObject("ADODB.Recordset")

Sql3="Select Top 5 * From "&class1&" Where pid='"&id1&"' Order By addtime Desc"

Rs3.Open Sql3,conn,3,3

If Rs3.Eof And Rs3.Bof Then

Response.Write "<tr><td width='5%' height='20'> </td><td width='95%'>"

Response.Write "本版块暂无信息!"

Response.Write "</td></tr>"

Else

'165行 Do While not Rs3.EOF

Else

id1=Rs1("id")

Set Rs3 = Server.CreateObject("ADODB.Recordset")

Sql3="Select * From "&class1&" Where Left(pid,8)='"&id1&"' Order By addtime Desc"

Rs3.Open Sql3,conn,3,3

If Rs3.Eof And Rs3.Bof Then

Response.Write "<tr><td width='5%' height='20'> </td><td width='95%'>"

Response.Write "本版块暂无信息!"

Response.Write "</td></tr>"

Else

Do While not Rs3.EOF

End if

%>

[866 byte] By [msdn] at [2007-8-15 10:03:38]
# 1 Re: asp 连数据库错误报告:缺少 'Loop' 165行

165 行以下的内容与 “If Len(Rs1("id"))=8 Then”是后面加上的,加了就报错,请教了!

xf422108 at 2006-6-6 16:00:27 >
# 2 Re: asp 连数据库错误报告:缺少 'Loop' 165行

当rs1("id")为 null出错。

gq at 2006-6-6 16:06:52 >
# 3 Re: asp 连数据库错误报告:缺少 'Loop' 165行

那请教你,因该怎么修改好呢?

xf422108 at 2006-6-6 16:19:20 >
# 4 Re: asp 连数据库错误报告:缺少 'Loop' 165行

可以写代码出来学习一下吗?自己写不来学习了

xf422108 at 2006-6-6 16:35:01 >
# 5 Re: asp 连数据库错误报告:缺少 'Loop' 165行

在线 UP 一下

xf422108 at 2006-6-6 16:49:11 >
# 6 Re: asp 连数据库错误报告:缺少 'Loop' 165行

do while 条件

代码

loop

这样的格式才对呀,没看到你的代码时有loop,那怎么对呢?!

感觉这种问题太简单,不知道是不是我理解的不对

windzjp at 2006-6-6 17:25:42 >
# 7 Re: asp 连数据库错误报告:缺少 'Loop' 165行

Do While not Rs3.EOF

没以loop结束你Do什么啊

ahhisoft at 2006-6-6 17:33:48 >
# 8 Re: asp 连数据库错误报告:缺少 'Loop' 165行

这个是条件语句的完整性,楼主注意看下

do while

……

loop

www_31365_com at 2006-6-6 17:48:16 >
# 9 Re: asp 连数据库错误报告:缺少 'Loop' 165行

语法错误!没办法了

goga21cn at 2006-6-7 0:02:56 >
# 10 Re: asp 连数据库错误报告:缺少 'Loop' 165行
Do While not Rs3.EOF

Loop呢???

at 2006-12-17 >

Web

All Classified