This topic is locked

Database moved

6/8/2004 6:01:55 PM
ASPRunnerPro General questions
T
Tegwin author

Hello,

I have created a database Webpage with ASP runner. I have moved my database to a new location, outside of my webroot. I now need to update the relevant file to look at my database in the new location.
I have tried everything and I cant get it to work.
Here is what I have done. I have my webroot folder and in that I have a directory called feedback which holds all the scripts generated from ASPRunner. Now when I try and access my private area which in a directory called PRIVATE. I keep getting errors.
I have tried the physical path name, as well as virtual path name as well as .././private/database.mdb and none of them work.
Can some shed some light on what I need to do here.
Thanks
Chris

Sergey Kornilov admin 6/8/2004

Chris,
please check this thread that explains how do you need to change connection string.
If this doesn't help - please post here full path to ASP files files folder and full path to the database folder.

T
Tegwin author 6/8/2004

Ok that did not work.
Ok the directorystructure is as follows

logs

Private

webroot


Ok now in the webroot folder I have a directory called CDKEYS and then the db folder
so webroot\ckeys\db CURRENT
I have moved the DB to Private.
I have tried to use ..\..\Private\dbname.mdb and ..\.\Private and .\.\Private and none of them work. etc
What does the ../../ mean does this mean 2 directories back from root ?

Sergey Kornilov admin 6/9/2004

According to the above directory structure the following connection string should work (I assume that ASP code resides in webroot\ckeys directory).

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


../../ (or ..\..\) means two directories up from the current directory.
Btw, what is the error message you receive?
If nothing helps - please contact me directly at support AT xlinesoft.com.

T
Tegwin author 6/9/2004

Hello,
Ok yes that worked The interesting thing is your connection string is different to the one that was made already This is your one you gave me

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


and this is the one that was there already

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

'server.mappath("'\private\cdkeys.mdb") & ";UID=;PWD="


What is the difference

Sergey Kornilov admin 6/9/2004

As far as I can see your connection string misses ..\.. in file path. Also there are some strange single quote characters in your connection string that probably break everything.

500130 6/9/2004

Even in my connection string when I used ..\..\private it still does not work.

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

'server.mappath("'..\..\private\cdkeys.mdb") & ";UID=;PWD="


However if I use the connecton stringh that you posted here it works.. what is the difference between the 2 connection strings.

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

Sergey Kornilov admin 6/9/2004

Chris,
please read an explanation in my previous post again.