介绍一下GETROWS的用法

1<html>
2<head>
3<title>Place Document Title Here</title>
4</head>
5<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

1<p>
2<table border="1">   

nRows = UBound( ary, 2 )
For row = 0 To nRows

1<tr>   

For col = 0 To UBound( ary, 1 )

1<td>```
2= ary( col, row ) 
3``` </td>   

Next

1</tr>   

Next

1</table>
2</p></body></html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus