What should my connection string be in my GLOBAL.ASA if I am using a File DSN/Datasource?

The connection string you should use in your GLOBAL.ASA should be in the following format. Be aware, you will need to change the paths, filenames and even your connectionstring variable to match your paticular application.

ConnectionString=
"filedsn=cd\directoryname\file.dsn;DBQ=
d:\inetpub\wwwroot\database.mdb"

For example: If your file.dsn was located in the "d:\inetpub\website" directory, and your database name was website.mdb, the connection string would be:

ConnectionString=
"filedsn=d\inetpub\EXAMPLE\file.dsn;DBQ=
d:\inetpub\EXAMPLE\website.mdb"

The following line will display the location of file.dsn in the root directory of your web, if you don't know it already. Change the filename to a file in your site so it can return the correct information.

Response.Write (Server.MapPath("/file.dsn"))

Get the local path to your website by loging into the Control Center at
https://www.webcontrolcenter.com/domain.aspx
and from the menu item SITE click on SITE ADMIN.

Add Feedback