Web Wiz - Green Windows Web Hosting

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

Database Connection String problem

 Post Reply Post Reply
Author
Michael Jr. View Drop Down
Newbie
Newbie


Joined: 21 May 2003
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michael Jr. Quote  Post ReplyReply Direct Link To This Post Topic: Database Connection String problem
    Posted: 25 May 2003 at 12:23pm

I'm hosting on a paid premium Brinkster account.  I'm having trouble with the site news app, specifically in the common.asp and site_news_preview.asp line:

strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("what do I put here?")

do I put path: \\premfs2\sites\premium7\username\database\news.mdb; of course I put my username in but then I get an invalid "/" or "\".

This worked for the forum, but the string was different.    I have also tried \database\news.mdb; path but I get "[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x758 Thread 0xcc0 DBC 0xbaf0024 Jet'."

any help is GREATLY appreciated!



Edited by Michael Jr.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2003 at 1:19pm

I am not sure what the folders look like on a paid brinkster account but in general you need to put the virtual path to your database there. So e.g.

strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database/mydb.mdb")

Alternatively you can also use a physical path (I don't know if Brinketer allows that:

strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\mypath\myfolder\database\mydb.mdb

Back to Top
Michael Jr. View Drop Down
Newbie
Newbie


Joined: 21 May 2003
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michael Jr. Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2003 at 6:47pm

Ok, I put in

strCon = ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\premfs2\sites\Premium7\myusername\Database\news.mdb")

This worked, but when I click on "Full Story" IE goes to download the actual new page to my hard drive.  Any suggestions?

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2003 at 7:20pm
OK I am confused, why are you using a UNC path? and usually if IE is to download an asp page it means the server is not asp enabled thus if you are talking about the news script you would have to be able to see the initial news list....
Back to Top
Michael Jr. View Drop Down
Newbie
Newbie


Joined: 21 May 2003
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michael Jr. Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2003 at 9:02pm

I was using that because I have no idea what I'm doing!

I was able to figure it out though.  I put in the URl instead of the c:// path.  Seems to work fine now.

 

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.