Dreamweaver MX ASP Tutorials Macromedia Dreamweaver MX

Define a MX DSN-less Connection- Step I

In the previous tutorial, Define a MX DSN, you created a Data Source Name in Dreamweaver MX so that you can connect to your database for development. Some web hosts do not offer Data Source Names, or charge extra for them. Have no fear, you can create a DSN-less connection, or as Dreamweaver MX refers to them a Custom Connection String.

1. File > Open and select the index.asp page you created earlier.

2. Open the Databases Panel (CTRL + SHIFT + F10) if it is not already open.

Application Panel

3. Click on the (+) sign in the Databases Panel and select Custom Connection String.

Application Panel

4. Type connTutorial2 in the Connection Name box of the Custom Connection String window. Type the following in the Connection String box:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\database\theTutorial.mdb;"

NOTE: Be sure to include the quotation marks " " and the semi-colon ; in the string.

Custom Connection String

5. Click the Test button in the Custom Connection String window and you should get the following window.

Connection was made successfully

6. Click OK and then look in the Databases Panel. You should now see the additional connTutorial2 connection there.

Application Panel

7. Open the Site Panel (F8) if it is not already open and notice that MX has added a file called connTutorial2.asp. This page will be used as an include file on all of your pages that connect to the database.

That's all there is to creating a DSN-less connection in Dreamweaver MX.