Print Page | Close Window

Access Database Connection

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=24284
Printed Date: 06 April 2026 at 5:24pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Access Database Connection
Posted By: kazmax
Subject: Access Database Connection
Date Posted: 29 August 2007 at 1:48am
First, good work with releasing v9. I just happen to be setting up a forum and thought I would drop by to pick up the latest version. Good timing on my part by the looks of it!
 
Anyway, I'm slightly curious about the new database connection for Access. I thought previously I had the option of using a DSN, but it appears in this latest version that only a direct access path to the database would do (though the WebWiz knowledgebase mysteriously refers to the ISP having to set up a DSN for you...).
 
I tried setting up a DSN instead of a direct path, but it went bang when it attempted to access the database. So I'm left wondering whether I'm stuffed with using the DSN option?

Reason for asking is because my ISP provides a separate directory for Access databases which is isolated from the web site (for security reasons). Using a DSN is no problem, but using a path could lead to some interesting discoveries on my part.
 
So, will v9 support DSN's? If so how?
 
Thanks,
Andrew
 



Replies:
Posted By: kazmax
Date Posted: 29 August 2007 at 2:07am
Okay, may have sussed this, but it requires a little surgery to the database_connection.asp script in the database folder.
 
About line 96 there is a string reference:
 
      strCon = strDbPathAndName
 
Replace with:
 
      strCon = "DSN=MyDSN"
 
About line 210:
 
      strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strCon
 
Comment that line out - the previous declaration around line 96 becomes the database connection used by the web site.
 
Haven't tried everything out with this yet, but at least with this limited change the web site came up without splashing errors onto the screen.
 
Andrew
 


Posted By: WebWiz-Bruce
Date Posted: 29 August 2007 at 2:01pm
DSN's are no longer a option as this is a slower connection method and not recommended.

As long as the database is on the same server you can use the a DSN-less connection to the database which is much faster.

All good web hosts setup a separate folder for Access databases outside of your web site, so the DSN-less method will work.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net