![]() |
If you are reading this page then it is assumed that you already know a little bit about ASP and running ASP scripts. We are going to use these sessions to make a simple Guest book to learn to view, add, edit, and delete data from a Microsoft Access database.
First we need to create a database in Access.
Open Microsoft Access and choose 'Blank Access Database' from the starting menu. You will be prompted for a name for the database and where you want it saved. Call the database 'guestbook.mdb' and save it in the same directory as the web page connecting to the database is going to be.
You should now see the main Access dialog box. Select 'Create table in design view'.

You now need to create 3 fields for the database and select their data types.
Create a field called 'ID_no' and set the data type to 'AutoNumber'. Also set this field as the primary key.
Create a 2nd field called 'Name' and set the data type to 'Text'.
Create a 3rd field called 'Comments' and set the data type to 'Text', but this time you need to change the default field size of 50 to 100 characters under the 'General' tab in the 'Field Properties' box at the bottom of the screen.

Once all the field's have been created and the data types and primary key set, save the table as 'tblComments'.
Now you need to enter some test data into the table. You can do this by double-clicking on the new table (tblComments) in the main dialog box. From here you can enter some test data. It is recommended that you enter at least 5 rows of test data.
Main Page | Hosting Plans | E-Commerce | Sign Up Now! | Site Map
web hosting by HyperlinkHost.com