You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
752 B
Plaintext

ADO Techniques -- The .maxrecords property
<html><head>
<TITLE>dbmaxrecs.asp</TITLE>
</head><body bgcolor="#FFFFFF">
<!--#INCLUDE VIRTUAL="/ADOVBS.INC" -->
<%
Set rstemp=Server.CreateObject("adodb.Recordset")
rstemp.maxrecords=15
connectme="DSN=Student;uid=student;pwd=magic"
rstemp.open "select * from titles", _
connectme,adopenstatic
' table display
howmanyfields=rstemp.fields.count -1
%>
<table border=1><tr>
<%
For i=0 To howmanyfields %>
<td><b><%=rstemp(i).name %></B></TD>
<% Next %>
</tr>
<%
Do While Not rstemp.eof %>
<tr>
<% For i = 0 To howmanyfields%>
<td valign=top><% = rstemp.fields(i).value %> </td>
<% Next %>
</tr>
<%
rstemp.movenext
Loop
rstemp.close
Set rstemp=Nothing
%>
</table></body></html>