易截截图软件、单文件、免安装、纯绿色、仅160KB

asp rs.movenext不管用

<%set rs=server.CreateObject("Adodb.recordset")

rs.open "select * from zs_news where m_classid="&classid&"  order by m_id desc",conn,1,1

rs.movenext'这行为什么不管用呢?去了这行能显示本条记录,但是加上不能显示下条记录

response.write(rs("m_classid"))


rs.close

%>
请教高手指点
<%set rs=server.CreateObject("Adodb.recordset")

rs.open "select * from zs_news where m_classid="&classid&"  order by m_id desc",conn,1,1

if not rs.eof then
  rs.movenext
    if not rs.eof then response.write(rs("m_classid"))
end if
rs.close

%>


试试吧

VBScript code:

<%
set rs = CreateObject("Adodb.recordset")
rs.CursorLocation = 3
rs.Open "select * from zs_news where m_classid=" & classid & " order by m_id desc", conn, 1, 1
Response.Write "记录数:" & rs.RecordCount
Do While not rs.EOF
response.write rs("m_classid")
rs.MoveNext
Loop
rs.Close
conn.Close
%>




rs.movenext要和

do while not rs.eof
....
rs.movenext
loop


相关问答:

asp初学问题。response找不到

<%@language="vbscript"%>
<%option explicit%>
<html>
<head> <title>xxx </title> </head>
<script language=vbs>
'注意变量 ......

ASP简单问题

conn.asp

<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.MapPath("Connt ......

这段asp生成xml 那里错了?哪位大哥帮帮忙啊

VB code:
<!--#include file="conn.asp"--><!--#include file="sqlin.asp"--><?xml version="1.0" encoding="gbk"?>
<%
Request_id=Request(&quo ......

ASP调试问题 什么也不显示????????

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xht ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号