Author |
Topic |
|
Goalie35
Starting Member
27 Posts |
Posted - April 26 2004 : 13:10:05
|
Hey guys. I'm using the ms access database that came with vp asp but I've moved it into its own subfolder, which I've named "db". So the entire file path is "vpasp\db\shopping500.mdb".
Now, from the looks of it, to have vp asp still be able to locate this database, I have to go into shop$config.asp and edit the const xdblocation="" line. I've tried resetting the value of this line to "\db\". I've also tried "db\" and "\db".
Unfortunately however, vpasp still can't find my database. What am I doing wrong?
Thanks in advance.
-Goalie35
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - April 26 2004 : 13:53:19
|
the database location is relative to the main directory that holds the main vpasp asp files.
so, if it's up and across and then down, then it'd be like: "../private/db"
if it's down it'd be: "db"
(no slashes on the end i think is the key point)
for security reasons, the directory that holds the database should really be outside the browsable pages so that it can't be downloaded. so really you want to put it outside your www files (hence it'd usually go somewhere like ../private/db or ../../private/db depending on how many levels you've got) Simon Barnaby Freelance Developer Java-E UK [email protected]
Edited by - devshb on April 26 2004 13:56:11 |
|
|
Goalie35
Starting Member
27 Posts |
Posted - April 27 2004 : 07:44:03
|
Unfortunately, it's still not working correctly. It can't seem to find the database and gives me the following error: ------------------- Error Type: ADODB.Connection (0x800A0E78) Operation is not allowed when the object is closed. /Magazines USA/shopproductsubs.asp, line 374 -------------------- My boss just purchased vp asp the other day and this is the first time I've even seen it. I haven't touched anything in vp asp other than moving the shopping500.mdb file to a subfile. I never touched this "shopproductsubs.asp" page.
Then, when I place the database back into the original directory, everything's fine again.
So basically, this is what's happening. I have a file called MagsUSA, which I've placed all vp asp files into. I then created a sub file placed within this "MagsUSA" file which I named "db" and then placed the "shopping500.mdb" into this file.
From what I can tell, I should be resetting shop$config.asp's "xdblocation" to equal "db". Shouldn't that work? What am I doing wrong? Thanks again.
-Goalie35
|
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - April 27 2004 : 11:42:51
|
that should work; with that setup you'd want to use: xDatabase="shopping500" xdblocation="db" xdatabasetype=""
it might be your folder permission settings that are stopping the database file from being read. (note that the xdatabase value should not include the .mdb extension)
try running the diag_dbtest.asp file; that might give you more details about why the database isn't being read.
Simon Barnaby Freelance Developer Java-E UK [email protected]
Edited by - devshb on April 27 2004 11:44:15 |
|
|
|
Topic |
|