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!
- Before you begin, you should have a Microsoft Access database with
an appropriate file name (.mdb extension, no spaces or funny
characters).

- 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.)
- UPLOAD your database.
- In Dreamweaver MX, click the
plus (+) in the
Databases panel and select
Custom Connection String.

- 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.

- 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.
|