Using GetRows To Get All Records From Table
Published on 9/11/2008 by editor|
Vote this tutorial:
|
More articles in ASP
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
Latest Posts
- Create and retrieve cookies
- Easy Error Handling in C#
- Filtering results from database
- Filling Data into Select List
- Working with Array Remove An Item
- Custom Paging in ASP Fast And Easy
- Display Top N records from MS Access
- Using GetRows To Get All Records From Table
- VBScript Functions The Len Function
- Free User Registration Form
- Copying Folders using File System Object
- ArrayList object usage with example
- Using SUM Function in An SQL Statement
- Compacting an Access database from ASP code
- Database Driven Login Script
- Methods of Session Object
- Simple XMLRSS Parser Part-II
- Selecting random record from database
- Image downloading from remote servers in ASP
- How to Encrypt String Using MD5


