asp movenext指针问题 在线等 急!!!
</head><body><%dimGodbook,username,rssetrs=server.CreateObject("adodb.recordset")rs.o...
</head>
<body>
<%
dim Godbook,username,rs
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 100 bookid,bookcontent from products by bookid ",conn,1,1
username=trim(rs("bookid"))
bookcontent=trim(rs("bookcontent"))
do while not rs.eof%>
<table border="0">
<tr bgcolor="#f0fff0">
<td align="center"><%=username%></td>
<td align="center"><%=bookcontent%></td>
<td align="center"></td></tr>
<% rs.movenext
loop %>
<% rs.close
set rs=nothing%>
</table>
</body>
为何movenext指针进行了死循环?谁知道?
进入了死循环 movenext指针没起作用 为何 展开
<body>
<%
dim Godbook,username,rs
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 100 bookid,bookcontent from products by bookid ",conn,1,1
username=trim(rs("bookid"))
bookcontent=trim(rs("bookcontent"))
do while not rs.eof%>
<table border="0">
<tr bgcolor="#f0fff0">
<td align="center"><%=username%></td>
<td align="center"><%=bookcontent%></td>
<td align="center"></td></tr>
<% rs.movenext
loop %>
<% rs.close
set rs=nothing%>
</table>
</body>
为何movenext指针进行了死循环?谁知道?
进入了死循环 movenext指针没起作用 为何 展开
3个回答
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
展开全部
<table border="0">
<%
dim Godbook,username,rs
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 100 bookid,bookcontent from products by bookid ",conn,1,1
rs.movefirst
while not rs.eof
username=trim(rs("bookid"))
bookcontent=trim(rs("bookcontent"))
%>
<tr bgcolor="#f0fff0">
<td align="center"><%=username%></td>
<td align="center"><%=bookcontent%></td>
<td align="center"></td></tr>
<%
rs.movenext
wend
rs.close
set rs=nothing
%>
</table>
<%
dim Godbook,username,rs
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 100 bookid,bookcontent from products by bookid ",conn,1,1
rs.movefirst
while not rs.eof
username=trim(rs("bookid"))
bookcontent=trim(rs("bookcontent"))
%>
<tr bgcolor="#f0fff0">
<td align="center"><%=username%></td>
<td align="center"><%=bookcontent%></td>
<td align="center"></td></tr>
<%
rs.movenext
wend
rs.close
set rs=nothing
%>
</table>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
username=trim(rs("bookid"))
bookcontent=trim(rs("bookcontent"))
在 DO WHILE循环外面
所以不管你循环多少次,内容都是一样,从代码上看,你的代码不应该出错死循环,如果死循环,页面会提示说,什么堆栈溢出之类,你确定是死循环,
</head>
<body>
<%
dim Godbook,username,rs
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 100 bookid,bookcontent from products by bookid ",conn,1,1
do while NOT (rs.EOF Or rs.BOF )
username=trim(rs("bookid"))
bookcontent=trim(rs("bookcontent"))
%>
<table border="0">
<tr bgcolor="#f0fff0">
<td align="center"><%=username%></td>
<td align="center"><%=bookcontent%></td>
<td align="center"></td></tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
</body>
bookcontent=trim(rs("bookcontent"))
在 DO WHILE循环外面
所以不管你循环多少次,内容都是一样,从代码上看,你的代码不应该出错死循环,如果死循环,页面会提示说,什么堆栈溢出之类,你确定是死循环,
</head>
<body>
<%
dim Godbook,username,rs
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 100 bookid,bookcontent from products by bookid ",conn,1,1
do while NOT (rs.EOF Or rs.BOF )
username=trim(rs("bookid"))
bookcontent=trim(rs("bookcontent"))
%>
<table border="0">
<tr bgcolor="#f0fff0">
<td align="center"><%=username%></td>
<td align="center"><%=bookcontent%></td>
<td align="center"></td></tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
</body>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询