50分找错

hz890 2006-10-31 12:24:49
代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
dim conn,cmd,rs,str
str="Driver={SQL Server};Server=192.168.0.9;DataBase=33222006;Uid=***;Pwd=***"
set conn=server.CreateObject("ADODB.Connection")
conn.ConnectionString=str
conn.open
set cmd=Server.CreateObject("ADODB.Command")

cmd.CommandText="[2006_DisplayMyRecentJoinedRings]"
cmd.CommandType=4
cmd.Prepared=true
cmd.ActiveConnection=conn
dim pm
set pm=cmd.CreateParameter("@memberid",3,1,4,14)
cmd.Parameters.Append pm
set rs=cmd.Execute
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>存储过程</title>
<style type="text/css">
A:link {
COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
COLOR: #000000; TEXT-DECORATION: none
}
A:hover:unknown {
COLOR: #333333;
}
TD {
COLOR: #333333; FONT-FAMILY: "宋体"; FONT-SIZE: 12px; TABLE-LAYOUT: fixed; WORD-BREAK: break-all
}
BODY {
COLOR: #333333; FONT-FAMILY: "宋体"; FONT-SIZE: 12px; TABLE-LAYOUT: fixed; WORD-BREAK: break-all
}
</style>
</head>

<body>
<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
<%
while not rs.eof
%>
<tr>
<td><%=rs("categoryid")%></td>
<td><%=rs("title")%></td>
<td><%=rs("preDomain")%></td>
<td><%=rs("tags")%></td>
</tr>
<%
wend
%>
</table>
<%
rs.Close
set rs=nothing
set cmd=nothing
conn.Close
set conn=nothing
%>
</body>
</html>

存储过程:
CREATE PROCEDURE [2006_DisplayMyRecentJoinedRings]
@memberid int=0
AS
select top 6 categoryid,title,joinCateID,preDomain,tags,flag,[description],logo=(case isnull(logo,'') when '' then 'default.gif' else logo end),bulletin,postCount,addDate,isAudit,isOpen,topicTitle,topicID,mcnt from [2006_abCategory] where userid=@memberid and (flag=1 or flag=2 or flag=4) order by categoryid desc
GO

出错信息:
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

答复对象 错误 'ASP 0104 : 80070057'

不允许操作

/pagedsource/page.asp,行0

如何排除错误?
...全文
67 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
<%
while not rs.eof
%>
<tr>
<td><%=rs("categoryid")%></td>
<td><%=rs("title")%></td>
<td><%=rs("preDomain")%></td>
<td><%=rs("tags")%></td>
</tr>
<%
rs.next
wend
%>

其他地方的错还没注意
lailuboy 2006-10-31
  • 打赏
  • 举报
回复
rs.movenext吧。

28,390

社区成员

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

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