Setting up a Data Source Name

In order for the web server on your machine to be able to talk with the database, you need to set up some sort of 'connection' on your system. This is just a definition of where the database is and a few simple rules on how it should be treated.

There are at least a couple of different ways of making this connection, but I have found the easiest to be defining a system DSN (Data Source Name).


If you're on a Windows9x system, then you can find ODBC in Control Panel. If you're running NT or Windows 2000, then ODBC is hidden under Administrative Tools, where it masquerades as 'Data Sources'.

So find it, run it, and we'll club together and beat it into submission. There's not a lot we have to set up here and it'll only take a moment, so grit your teeth and think of UltraDev victory.

This is what the ODBC panel should look like, with the System DSN tab selected:

You may find there are all sorts of things in there which you don't recognize - don't worry about it for now. We want to add a new DSN, so click the Add button in the top right.

So this is the dialog which asks us which database driver we want to use. I'm sure you're familiar with the fact that to use a printer you need a driver made for that type of printer - in the same way, to use a database you need the correct driver for that type of database. We're going to be using an Access database, so I've selected the Access Driver from the list. Your list may be much longer than this - I know it seems to vary from OS to OS.

Click on Finish.

This dialog asks you to give your connection a name. As you can see, I've called mine DreamweaverFever. Try and make the name as descriptive as possible - if you start to build up lots it really helps to have clear names.
You can enter a description if you like, but it's not necessary.

Click Select.

You should now see a standard Browse box. Go a-hunting and find that pesky little database - you know where he's hiding.

Click OK and OK and OK to close all the ODBC windows and you're done!