Popular Articles | Latest Articles | Categories | RSS Feeds


Using GetRows To Get All Records From Table

by editor Published 9/11/2008 | ASP |
 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
%>

Comments:
no comments submitted


Only members can write comments.Please, login / register to write comment.




ASP.NET Resources, Reviews

ASP Resources, Reviews

PHP, ASP, .NET, JSP Resources, Reviews


Search

Member login


Who's online

  • There 33 online users.