This topic is locked

Cannot Connect to DB

3/23/2004 2:31:26 PM
ASPRunnerPro General questions
author

I am a newbie. I created a website on my local PC that works fine. The connect string is:
<%

strConnection = "Provider=MSDataShape;DBQ=C:\Inetpub\wwwroot\Telephone_Switch.mdb;Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;"

%>
We keep our webserver on a central server. I moved a copy of the DB there and recreated the site. You know whats coming. .. The famous "[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'SOFTWARE\ODBC\Brazos volatile counter'." error. I checked the security tried using the mappath option, I cannot get it to work.
The mapped path to our server is: cgi-bin on 'Jfsantsql1\web' (Z:).

The absolute path is: \\Jfsantsql1\Web\cgi-bin\
Can you help. I like the package and would like to start using it.

Admin 3/25/2004

Tim,
you need to use Server.MapPath option. Do not forget to move all files from ASPRunner output folder (with subfolders) to the Web server after that.
Currently connection string points to C:\Inetpub\wwwroot\Telephone_Switch.mdb which is incorrect when you run ASP pages on the server.
Let me know if it solved your problem.

T
tim44202 3/25/2004

Seems to be a step in the right direction. Now the error is :
"The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed.
--------------------------------------------------------------------------------
Please try the following:
Open the jfsaweb1 home page, and then look for links to the information you want.

Click the Refresh button, or try again later.
Click Search to look for information on the Internet.

You can also see a list of related sites.
HTTP 500 - Internal server error

Internet Explorer

"
The actual server path is:
\\Jfsantsql1\Web\cgi-bin\
The Web Site is:

\\Jfsantsql1\Web\cgi-bin\Telephones
The Connect include is:
<%

strConnection = "Provider=MSDataShape;DRIVER={Microsoft Access Driver (*.mdb)};

DBQ=" & server.mappath("\\\Jfsantsql1\Web\cgi-bin\Telephone_Switch.mdb\Telephone_Switch.mdb") & ";UID=;PWD="

%>
Feel so bad that I'm so dense.
Thanks

Admin 3/25/2004

Tim,
there is still a problem with your connection string.
if you use Server.Mappath option you just need to put DB or

Database in that text box.
Another option - try to use the following connection string (adjust it if required):

<%

strConnection = "Provider=MSDataShape;DRIVER={Microsoft Access Driver (*.mdb)};

DBQ=\\Jfsantsql1\Web\cgi-bin\Telephone_Switch.mdb;UID=;PWD="

%>


I hope this helps.