This topic is locked

dbconnection issue

11/20/2007 9:46:03 PM
ASPRunnerPro General questions
M
mfred author

I have an application which I need to transfer to a new server. The application was written in asprunner 4.0.

The original dbconnection code read:

<%

strConnection = "DBQ=" & server.mappath("db\Tejas.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;"

%>
On the new server,I get the following error when trying to run the application:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not find file 'c:\windows\system32\inetsrv\Tejas.mdb'.
The host said to use:

<%

strConnection = "Provider=Microsoft.Jet.OLEDB.4.0; Data

Source=c:\inetpub\vhosts\moglobalmedia.com\httpdocs\tejas\Reservations\db\Tejas.mdb;

User Id=admin; Password="

%>
But I get the same error. Any assistance is appriciated.

D
dlangham 11/21/2007

Try using the following script:

<%

strConnection = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\inetpub\vhosts\moglobalmedia.com\httpdocs\tejas\Reservations\db\Tejas.mdb;UID=;PWD="

%>
Sergey Kornilov admin 11/21/2007

If you use connection string provided by your hosting company and it doesn't work - I'd suggest to ask them what is wrong.
Connection string itself looks good to me.

M
mfred author 11/23/2007

Dale, I tried your code but I get the same message. Servey, I was thinking that it was on the host side but they claim that it is not.

Sergey Kornilov admin 11/24/2007

If the same code works fine on another web server that means something is wrong with the new web hosting.

M
mfred author 11/25/2007

I wanted to note that I figured this out. In addition to changing servers, I also an switching the database from SQL to Access. I thought that I had changed all the relevant code but missed a couple of lines.