| Introduction: In this tutorial I will teach you how using Dreamweaver 8 and its ASP.NET function to display information stored in a database you created. The database and image files needed for this tutorial will be available to you which will make it very easy to follow. If you are having problems feel free to e-mail us, or post a message on the forum. If you like this Tutorial please click here to Digg us or add the tutorial to Del.icio.us |
In this tutorial, I will teach you how to display information in a database.
Step1: Setting up work space. For this to work you will need to have the software below installed.
Also, you have to setup your site definition. This will include the Local Information and Testing Server for ASP.NET VB As shown below. After you get that going download the pack which includes the database and images.
At this point I will take it that you have Dreamweaver setup and can run asp.NET pages. And you have the database and image folder inside the "Inetpub\wwwroot\yoursitename\" folder
Step2: Creating a database connection and Dataset. Click File After that click on the Windows tab and make sure Databases is checked.
Click on the
With that fill in the information below. Connection Name: tutbd Next click on the Build Button and the window blow should come up
From the Provider tab select "Microsoft Jet 4.0 OLE DB Provider" and click Next. With that the window below should come up.
Click on the button next to the "Select or enter a database name" and browse to your database file. Mine is C:\Inetpub\wwwroot\pixeldigestts\database\tutdb.mdb
After that Hit the Test Connection Button, and it should be successful. With that click ok. Make sure you connection string look similar to what I have below.
"Provider=Microsoft.Jet.OLEDB.4.0;
At this point you should be in the OLE DB Connection window, click on the test button
If you see the message above, that mean you are going good so far. Click ok, and Ok again. In the Application window click on the
and select DataSet (Query), with that you should see the window below.
Fill in the information according to the image below.
After that click ok. Now you should have the dataset shown below
Click on the Little + next to the dataset and you should see all your records in the database.
Step3: Preparing the page to add the information.
Create the table shown below.
You can copy this code and paste it into Dreamweaver code view if you have a hard time building the table.
From the dataset
Drag the name into the table to look like the file below.
To add an image click on
Now select the "tutThumbnail" and click ok twice. At this point you table should look like the image below.
Hit F+12 to preview you work. It should look like the image below.
Step4: Displaying all the records in the database. Click on the table and select the table code shown below.
When you click on the table it will select your table. With the table selected click on Server behavior located in the Application window. From there click on the
When the window above comes up click on All Records and press ok. With that your table should change a little, the Item Template should come around it.
Preview your page, and you should see all the records in the database. |
discuss this topic to forum


















