Building a functioning mini website with dynamic contactlist

A beginner tutorial describing from beginning to end how to set up a three page website with a dynamic contact list combined with a detail page, the finished project is included for study.
This tutorial covers: Defining the site, building a page and copying it, setting up a quick Database, creating the connection, using the dynamic data and creating a detail page in full detail, no live objects here.

This tutorial is compatible with Dreamweaver MX, in MX the databindings panel is upgraded to what is now the Application panel.

Building a basic site with Contact page

Part 2: Setting up the database

Ok, so now we have all three pages, but where do we store the employee info ?
We use databases for that, in this example I use MS-Access '97, so let's start her up.

Creating the database for our needs:
It comes up asking if we want to create a new one, use the wizard to make a new one or open a existing one. We are making a new empty database, we give it a name and remember where we save it, eventually this will end up in our Data folder we created earlier...

So, now we have a empty database, that isn't going to be much usefull so we create a new table, we want to do this in design view so select that option in the menu that pops up. Now comes the real heart of our page, what info do we want to display and do we want a option so that people can visit a more detailed info page ?

In this case we keep it simple... we want the following fields:

FirstName
LastName
Department
Position
EmailAdress

These are all text fields, i always set the text field options to 255 characters and zero length allowed to yes. So we got our basic fields, we forgot 1 thing, a Unique field to relay to a optional detail page, so let's close this design view it asks if we want to save these design changes, offcourse we reply yes, and it'll ask for a name, name it Employees and continue, hmmm it recommends adding a unique field, YES, we want one. So now we have our table and we can start entering some data.

I think you all can do alot better then me, the important thing is we have some data to play around with :-)
We can close MS-Access now and switch back to UDev.

Making Connection:
Let's setup our system so that UDev can actually use this data, first we have to build a connection for the site, open the contacts.asp page, go to menu Modify -> connections, click on new, select DSN and give it a decent name, i used connTut :-)
Then i had to define a new DSN entry, so i did, told it what driver, where the .mdb file was and gave it a name, then i selected it and clicked on test, I got a connection was made succesfully and we can ok the connection, ok the modify connection too and we're back at the page.

We now want to get the data in our page, so we open the server behaviors window (if it's not open yet) by pressing CTRL + F9 and we click on the databindings tab screen and click on the + icon and selecting Recordset (Query), we get a window like this:

As you can see, i allready set everything up the way it should be for this tutorial, we tell it that the name for this data is rsTutContact, the connection used is connTutCont, we set it up earlier, i want all columns and i sort on first name. If we click on test we see it retrieves everything we entered, which is what we wanted. Ok this window.

Goto part 3

Dennis van Galen

Dennis van GalenDennis started his career as order picker in warehouses. In the past 10 years he did alot of data-entry work for Government agencies and around the age of 20 he helped clean the KPN Telecom customer databases. At the age of 27 Dennis returned to KPN Telecom where he was a full time webmaster / webdeveloper. In his spare time he used to be a voluntary Manager for DMXzone.com. After leaving KPN in 2012 Dennis worked for Tevreden.nl on webbased customer satisfaction platforms.

In the past 12 years Dennis became experienced with various webtools, web-languages and database systems.

See All Postings From Dennis van Galen >>

Comments

Fantastic!

August 13, 2001 by Waldo Smeets
Fantastic tutorial. Thanks for taking the time to write and share it with us!

Marvellous

August 20, 2001 by Richard Davies

Well done. This tutorial sets an excellent benchmark to be lived up to. I am going to brush up my efforts as this tute is making mine look bad!

R

RE: Marvellous

August 25, 2001 by Dennis van Galen

Is it really that good ?
I tried writing this as detailed and understandable as possible.

I think I succeeded :-)

Dennis

Recommended Reading

March 23, 2002 by Everett Padgett
Excellent work my friend! I am a very novice user of ultra dev and the whole application server concept and live data options were kind of fuzzy to me. I completed several pages with a clear understanding of dynamic content while using your tut. Thanks for the excellent details for a newbie like me.

You must me logged in to write a comment.