Simple Example Retrieving All Results into an Array

<% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "ADOSamples" sql="SELECT * FROM Orders" Set RS = Conn.Execute(sql) %> Here are the results from the query:
<%=sql%>

<% For i = 0 to RS.Fields.Count - 1 %> <% Next %> <% ' Put up to 100 rows in a 2d variant array v=RS.GetRows(100) RS.close Conn.close %>

<% For row = 0 to UBound(v,2) ' iterate through the rows in the variant array %>

<% For col = 0 to UBound(v,1) %> <% Next %> <% Next %>
<% = RS(i).Name %>
<% = v(col,row) %>