Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access Database Connection
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access Database Connection

 Post Reply Post Reply
Author
kazmax View Drop Down
Groupie
Groupie


Joined: 05 November 2002
Location: United Kingdom
Status: Offline
Points: 68
Post Options Post Options   Thanks (0) Thanks(0)   Quote kazmax Quote  Post ReplyReply Direct Link To This Post Topic: Access Database Connection
    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
 
Back to Top
kazmax View Drop Down
Groupie
Groupie


Joined: 05 November 2002
Location: United Kingdom
Status: Offline
Points: 68
Post Options Post Options   Thanks (0) Thanks(0)   Quote kazmax Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.