How To Connect To A Database in Dreamweaver CS3

database
Creative Commons License photo credit: Tim Morgan

This article came about via a few emails I have had over the last week from readers asking for an article showing how to connect your website application to a back end database. It really is not all that difficult to do and once you have read this article you will have all the knowledge you need to achieve it.

Step 1. Set Up Your Local and Remote Site.

The first thing you need to do is set up your site in Dreamweaver CS3. If you do not know how this is done then I would recommend you SIGN Up for my Weekly Design and Blog Tips Newsletter where you will immediately receive a copy of my E-Book - “How to Create a Working Contact Form”. In that it outlines how to set up a site in Dreamweaver CS3.

Once you have your site set up then we can connect to a database. Now most hosting providers like BlueHost will give you a number of databases with your hosting account. In this article I have created a new database called Example, and also a user for the database, example.

Step 2. Let’s Get Connected

Now that we have your site set up and a database to connect to let’s connect to it. Over on the right hand side you will see the APPLICATIONS Tool Pane (see below) that is where we will be doing all the work.

Step 3. Use The Connection To Retrieve Data.

Now that we have a successful connection to the database you can start doing some funky stuff. Just for this article I will pull the data from a table that I had created and display it on the web page.

For that, we need to create a Record Set. So form the Application Panel > Bindings Tab click the (+) Button and select Record Set. Give the Record Set a Name and select the other fields as you can see below.



On your page, add a form and then from the Bindings Tab, expand the Record Set and simply drag and drop the table fields onto the page or select a field and click the Insert button at the bottom of the Bindings Window.

For the purpose of this article I have simply put one record on the page so you can see what happens.

And the end result is that one record is pulled out and displayed on the web page. Now you can do all sorts of stuff now that you have a connection to a database like placing forms on your page that will insert data into the database etc etc. So if people are interested I will get to work on an article that will outline how to do that. Make Sure you SUBSCRIBE to my RSS Feed so you don’t miss any more articles.

Don’t Miss Any More Design Tips !!! SIGN up to my Web and Blog Design Tips Newsletter and receive a copy of my E-Book - “Creating a Working Contact Form”


| del.icio.us | Digg it | Furl | reddit | StumbleUpon | Yahoo MyWeb

You can follow any responses to this entry through the RSS feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

9 Responses to “How To Connect To A Database in Dreamweaver CS3”

  1. hi
    does it requireinstalation of my_sql?the one with hosting my web has its own my_sql,how can its be?
    Help.

  2. thanks for such a informative and important tutorial. we will look forword to get more important dreamweaver tutorial from you sir.

  3. Please helpppppppppppppppp………oh tks for being here for me. Ehh…I don’t know how to create an email contact form that works, outlook express pop out every time i click the summit button…how i can place the text fill that visitor can fill email add, so I can receive at inbox, I was told I need a script? ehh that is so difficult, coz mind is static site and now i m helpless about dynamic staff, can u please teach me step by step how to do active email contact form, where out look don’t pop out everytime summit button is click
    Thank you so much for your help and will be waiting for yr feed back. Merry Christmas and happy holiday!

    Regards
    Jacquelyn

  4. Ok This is Regarding viewing of data!Now How to Insert Data into the database

  5. I love it! Maby now i dont need to use cutenews. I just wish you could have described a bit more every step.

  6. New Subscriber to your RSS. Good stuff. Trying to learn more about the server side and databases through Dreamweaver, PHP and SQL.

  7. hello i am trying to connect to the database from dreamweaver but it doesn’t work …

  8. Hi there,
    I read your tutorial about connecting a page to database and is very forward and interested. Actually I am writing you because I very stuck my small project. I am using Dreamweaver Cs3 so I think that your illustration will be the one that I am looking for.
    1 - I have a database where I can insert some data on it but I don’t know how connect it to the external image folder; so when the users retrieve informations from the database the images of each sender are automatiaclly attach with it. I love to learn as well how to build a result page to display the information with their images next to each other on a HTML table.
    THanks for your comprehension and your help.

  9. Of course, what a great site and informative posts, I will add backlink - bookmark this

Leave a Reply