Search Tools Links Login

ADO GetRows example


You can use ADO GetRows to output and ADO recordset to an array. This is often useful in n-tier applications when you are moving data between tiers--or if you want to persist your data in another way.
http://adozone.cnw.com/default.htm

Original Author: Found on the World Wide Web

Code



Place Document Title Here


<%
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
%>



<%
nRows = UBound( ary, 2 )
For row = 0 to nRows %>

<% For col = 0 to UBound( ary, 1 ) %>

<% Next %>

<% Next %>
<%= ary( col, row ) %>


About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 116 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.