读取从第n条记录到m条记录的SQL语句??????
zytp 2003-10-27 11:20:57 在网上找到的但我用不好使!
Microsoft JET Database Engine 错误 '80040e14'
SELECT 子句中包含一个保留字、拼写错误或丢失的参数,或标点符号不正确。
/news/test1.asp,行8
数据库中有20条记录!
帮我看看或者,你有别的方法能读出从第n条记录到m条记录的方法
请赐教 !
<!--#include file="conn.asp"-->
<%
dim m,n
n=1
m=10
set rs=server.createobject("adodb.recordset")
sql="SELECT TOP m-n+1 * FROM gg WHERE (id NOT IN (SELECT TOP n-1 id FROM gg))"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.write "暂无"
else
do while not rs.eof
%>
<%=rs("title")%>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>