Connection String

Home Dreamweaver I Dreamweaver II Flash Fireworks Photoshop

Video Demonstration (4MB)

For the Andes site, we used the Data Source Name (DSN -- assigned by server administrator using the ODBC control panel)  to create a connection to a database on the server.  You can also create a DSN-less connection using a Custom Connection String.   This can save you time and hassles, especially if you don't have administrative access to the Web server.  Some hosting services change money for creating a DSN, so this alternate technique can even save you money!

  1. Before you begin, you should have a Microsoft Access database with an appropriate file name (.mdb extension, no spaces or funny characters).Screen shot of local root with folder
  2. All database files should be in a folder called database in your local  root folder. If necessary, use Windows to copy  your database file  into the database  folder.  (NOTE - you can call the folder whatever you like, but on the cis2.cuyamaca.net server, your database folder has been assigned special permissions.)
  3. UPLOAD your database.
  4. In Dreamweaver MX, click the plus (+) in the Databases panel and select Custom Connection String.




     
  5. Type or copy & paste the following connection string:

    Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\username\database\database_file_name.mdb

    Change username to YOUR username and database_file_name.mdb to YOUR database file name.  This all needs to be on ONE line.




  6. TEST your connection.  If it doesn't work, make sure you uploaded the database folder and that your connection string is correct.  You can open the connection in the connections folder and view the file in code view.  Your code should look something like this, but with the connection string on one line.
     

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_connLinks_STRING
MM_connLinks_STRING = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\joreed\database\links.mdb"
%>

Don't forget to upload your Connections folder!

Once you have your connection set up (and permissions are set on the folder), you'll be able to create recordsets.  I may have to change permissions on your database folder if you want to write to your database.  Contact me if you get an error message when you try to add or edit a record.

 

 

Home ] Dreamweaver I ] Dreamweaver II ] Flash ] Fireworks ] Photoshop ]

When you see the movie icon next to a question, click it to view a narrated Video Tutorial.  You'll need a high-speed connection or plenty of time to view these large files.  You'll also need the  Windows Media Format plug-in if you don't already have it.  You can also right click the icon and "Save Target As" to download the file.


 

Revised April 07, 2003 by Jodi Reed and Christine Clark
http://www.cuyamaca.net/WebDevFAQs/
Computer Information Systems
Cuyamaca College

site development funded in part by VATEA