This topic is locked

Cannot connect to DB

5/13/2003 3:33:28 PM
ASPRunnerPro General questions
author

Hello,
I've been trying to open my DB for a while now and it really does not show any positive signs at all <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=65&image=1&table=forumtopics' class='bbc_emoticon' alt=':angry:' />
Error number: -2147467259

Error description: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xa70 Thread 0xb94 DBC 0x225bfe4 Jet'.
My DB is on an IIS server in the web site. It's an MS Access mdb, one single table.
my dbconnection.asp contains the following:

strConnection = "Provider=MSDataShape;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=../../../fpdb/report_form1.mdb;UID=;PWD="
I want it to be relative, so ../../../ folders up to de dbconnection.asp page to reach the root of the folder structure (taken out of the global.asa generated in FrontPage)

I don't know if I should specify a username/pwd in this connection string, there's nothing defined in the DB, everybody can write to it... (it's part of an intranet)
Any idea? any one pleeeez...

admin 5/13/2003

Hi,
this error message means that ASP engine cannot find your database.
Here is how your connection string should look:

strConnection = "Provider=MSDataShape;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("../../../fpdb/report_form1.mdb")& ";UID=;PWD="


User name and password can be left empty.
Sergey Kornilov

500032 5/14/2003

I still cannot connect.
What is the default path for ASP pages? Is each page aware of the web root or must I navigate from the local page? (should I use ../../... to go back up folder structures and back down db path?)
The ASPRunner uses a local path (on my local PC) how do I reference a relative path on a web server?

I cannot say c:\.... because I don't know the local structure, I know only from my web root.

(using IIS5.0)
I feel like I've now tried everything an nothing works. I always get the exact same message.
I also have a global.asa page in my root, there FP uses "Application("dbname_ConnectionString") can I some how use this in the ASPRunner generated pages? I have pasted the entire folder and files from ASPRunner into my web.

The login page works fine, but it always fail to open the DB.
I am a true newbee in ASP <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=201&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />
Thanks for the help!

admin 5/14/2003

Hi,
I would recommend to use Server.MapPathoption when you generate ASP pages. In this case everything will work fine.
You can play with moving database to another place after that.
Sergey Kornilov