Basic Databases Part 1
page 4 of 4
by . .
Average Rating: 
Views (Total / Last 10 Days): 25478/ 40

Step 3 : Show me the data

Step 3: Show me my data.

Now that all of our data is stored in our RecordSet (called RecordSet1) we must display it. Initially I'm just going shove it all onto the screen, quite messy but I'll clean it up later. To view data then you need these statements: NOTE: We are only going to show 1 column otherwise it gets a bit messy. When we move onto the next few steps I will be doing all of the columns.

While Not RecordSet1.EOF

This is a simple While Statement. The Not is the same as <> and RecordSet1.EOF is a Boolean property that tells us if it is at the bottom record or not. The next line closes off the ASP tag only to open it with a Response.Write tag and to make it more clear I did this. Recordset1.Fields.Item("") is just that, a field in the current row, called Address in this case, then we get the value of that cell.
This will return the following screenshot:

Wrap up

I'll wrap up this section here before we start doing the tables.

View Entire Article

User Comments

Title: SQL SERVER 2000   
Name: Anchal
Date: 2005-03-17 12:49:41 PM
This is a great help for I am just starting up with ASP and DATABASE and ADO

one thing...example you took is based on MS ACCESS...
Would it be similar for the MS SQL SERVER 2000???

Please would be a great help..

Title: Connection error   
Name: lumy
Date: 2005-03-01 8:59:52 AM
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/currency/respond.asp, line 33

Please assist.
Title: Great Help   
Name: Rizwan
Date: 2005-01-15 4:16:22 AM
This is really great help for newbies, also for those who forget forget the logical procedure of database programing.
Thanks you Mr. Author!

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-07-25 1:04:07 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search