asp网页调用变量函数问题。放到自己的站无法打开
<%Setrs=Server.CreateObject("ADODB.Recordset")ifextype<>""thensql="select*from"&web_d...
<%
Set rs = Server.CreateObject("ADODB.Recordset")
if extype <> "" then
sql = "select * from "&web_dbtop&"shop where ex_check = 1 Order by "&extype&" "&sc&", id desc"
else
sql = "select * from "&web_dbtop&"shop where ex_check = 1 Order by id desc"
end if
rs.Open sql,conn,1,1
if not rs.eof then
rs.PageSize = rs_parameter("ex_list")
page=Request.QueryString("page")
If page="" Then page = 1
If not isnumeric(page) Then page = 1
page = Clng(page)
If page>rs.PageCount Then page=rs.PageCount
If page<=0 Then page=1
rs.AbsolutePage=page
for i=1 to rs_parameter("ex_list")
if rs.eof Then exit For
'If i Mod 2 =0 Then
'response.write "<tr bgcolor=""#FFFFFB"">"
'Else
'response.write "<tr bgcolor=""#FDFAE7"">"
'End If
%>
原网页代码正确的,放到自己的站显示错误 parameter
页面无法打开!!!
<div style="float:left; background-image:url(images/down_m2.jpg); padding:4px 0px; height:30px; width:747px; text-align:center;">
<%=show(rs.recordCount,rs_parameter("ex_list"),page,4,"page","curr")%><%rs.Close:Set rs = Nothing%>
</div>
Microsoft VBScript 编译器错误 错误 '800a03fc' 缺少 'Next'
/dgdd.asp,行 908
显示错误提示 展开
Set rs = Server.CreateObject("ADODB.Recordset")
if extype <> "" then
sql = "select * from "&web_dbtop&"shop where ex_check = 1 Order by "&extype&" "&sc&", id desc"
else
sql = "select * from "&web_dbtop&"shop where ex_check = 1 Order by id desc"
end if
rs.Open sql,conn,1,1
if not rs.eof then
rs.PageSize = rs_parameter("ex_list")
page=Request.QueryString("page")
If page="" Then page = 1
If not isnumeric(page) Then page = 1
page = Clng(page)
If page>rs.PageCount Then page=rs.PageCount
If page<=0 Then page=1
rs.AbsolutePage=page
for i=1 to rs_parameter("ex_list")
if rs.eof Then exit For
'If i Mod 2 =0 Then
'response.write "<tr bgcolor=""#FFFFFB"">"
'Else
'response.write "<tr bgcolor=""#FDFAE7"">"
'End If
%>
原网页代码正确的,放到自己的站显示错误 parameter
页面无法打开!!!
<div style="float:left; background-image:url(images/down_m2.jpg); padding:4px 0px; height:30px; width:747px; text-align:center;">
<%=show(rs.recordCount,rs_parameter("ex_list"),page,4,"page","curr")%><%rs.Close:Set rs = Nothing%>
</div>
Microsoft VBScript 编译器错误 错误 '800a03fc' 缺少 'Next'
/dgdd.asp,行 908
显示错误提示 展开
1个回答
展开全部
你这错误提示都说得很明白很明白了,是缺少next
因为你的代码使用了for循环
而你的for循环有始且无终
上面用了:
for i=1 to rs_parameter("ex_list")
开始循环
但下面没有 next 继续循环
修改:
for i=1 to rs_parameter("ex_list")
if rs.eof Then exit For
'If i Mod 2 =0 Then
'response.write "<tr bgcolor=""#FFFFFB"">"
'Else
'response.write "<tr bgcolor=""#FDFAE7"">"
'End If
rs.movenext
next ‘这里就有next了
%>
因为你的代码使用了for循环
而你的for循环有始且无终
上面用了:
for i=1 to rs_parameter("ex_list")
开始循环
但下面没有 next 继续循环
修改:
for i=1 to rs_parameter("ex_list")
if rs.eof Then exit For
'If i Mod 2 =0 Then
'response.write "<tr bgcolor=""#FFFFFB"">"
'Else
'response.write "<tr bgcolor=""#FDFAE7"">"
'End If
rs.movenext
next ‘这里就有next了
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询