取10条记录,多谢!急
<%
dim Conn
set Conn=server.createObject("ADODB.Connection")
Conn.Open "DSN=RDJYXX;UID=sa;PWD=;DATABASE=RDJYXX"
此处用得是系统数据源
sql="select * from table"
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open sql,Conn,1,3
if (RS.EOF Or RS.BOF) then
response.write"对不起,没有找到您要查询的信息,请重新查询!<BR>"
else
for j=1 to 10
For i=0 to RS.Fields.Count-1
Response.WRITE j&":"& RS.Fields.Item(i).Name &" "&RS.Fields(i).Value&"<BR>"
Next
Next
RS.CLose
Set RS=Nothing
Conn.Close
Set Conn=Nothing
%>