介绍一下GETROWS的用法
类别: ASP教程
<HTML>
<HEAD>
<TITLE>Place Document Title Here</TITLE>
</HEAD>
<BODY BGColor=ffffff Text=000000>
<%
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open Application("guestDSN")
sql = "SELECT * FROM authors"
Set RS = cn.Execute(sql)
ary = rs.GetRows(10)
rs.close
cn.close
%>
<P>
<TABLE BORDER=1>
<%
nRows = UBound( ary, 2 )
For row = 0 To nRows %>
<TR>
<% For col = 0 To UBound( ary, 1 ) %>
<TD><%= ary( col, row ) %> </TD>
<% Next %>
</TR>
<% Next %>
</TABLE>
</HTML>
<HEAD>
<TITLE>Place Document Title Here</TITLE>
</HEAD>
<BODY BGColor=ffffff Text=000000>
<%
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open Application("guestDSN")
sql = "SELECT * FROM authors"
Set RS = cn.Execute(sql)
ary = rs.GetRows(10)
rs.close
cn.close
%>
<P>
<TABLE BORDER=1>
<%
nRows = UBound( ary, 2 )
For row = 0 To nRows %>
<TR>
<% For col = 0 To UBound( ary, 1 ) %>
<TD><%= ary( col, row ) %> </TD>
<% Next %>
</TR>
<% Next %>
</TABLE>
</HTML>
- 上一篇: 关于AUTOCOMPLETE(文本框的自动填充)
- 下一篇: 取得浏览者的离开时间
-= 资 源 教 程 =-
文 章 搜 索