Using GetRows To Get All Records From Table
Vote this news:
Following example, extracts all of the records in a database table and stores into a 2-dimensional array. This gives you an advantages to modify and work on data.
<%
Set cn = server.createobject("adodb.connection")
cn.open "Provider=SQLOLEDB;Server=ASP;User ID=sa;Password=;Database=Northwind;"
set rs = cn.execute("select LastName, FirstName from Employees")
dbArray = rs.GetRows()
for i = 0 to ubound(dbArray, 2)
response.write dbArray(0, i) & ", "
response.write dbArray(1, i) & "
"
next
%>
no comments submitted

