The code below will display all the records from our "tblFriends" table in the database 'Friends.mdb' and format each record returned in a HTML table. The database table has 3 columns, firstly an 'ID' autonumber field, secondly a textfield called 'FirstName' and lastly another textfield called 'SurName'.
Call our file 'format_records.asp'
The above code will display the ID number, the FirstName and SurName of all the entries in your database table. If there are no entries then the message 'No records returned.' will be displayed. Each record is displayed in its own table cell.
| Previous: Connecting to a MSSQLServer database |
Get the best asp web hosting provider now and save 30%
Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.