排序问题
让数据库的数据按编号由大到小输出。我用的是FIREFOX浏览器,出现错误Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
ADODB.Recordset 错误 '800a0cb3'
对象或提供者不能执行所需的操作。
/wyx/abc.asp,行20
如果不排序,一切正常。不知道是哪出的问题,代码在下面,我先对大伙说声谢谢了。<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<%dim con
set con=server.CreateObject("adodb.connection")
con.connectionstring="provider=microsoft.jet.oledb.4.0;" & "data source=" & "C:\TDDOWNLOAD\db.mdb"
con.open
dim rs
set rs=server.CreateObject("adodb.recordset")
rs.open "biao",con,3,2,2
%>
</head>
<body>
<%
rs.sort="编号 desc"
for i= 0 to rs.fields.count-1
response.write(rs.fields(i).name)
next
response.write("<br>")
while not rs.eof
for i=0 to rs.fields.count-1
response.write(rs(i) & " ")
next
response.write("<br>")
rs.movenext
wend
%>
</body>
</html>