User login

MetaTraffic 2.0 Boxshot

root pages cause db error

Posted by sagentm [November 9, 2004]

Hello... Great App!

Ok, here's the problem... I get the following error when navigating to my homepage or any page in the root:

Microsoft JET Database Engine error '80004005'
'\\nas-001\winspace\database\db.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
/metatraffic2/core.asp, line 199

I am using ASP tracking .

This only happens on my root pages, any pages I am tracking that are a level below are fine, here's a brief outline of the directory structure;

sample dir1 > default.asp (this tracks fine)
sample dir2 > default.asp (this tracks fine)
metatraffic2 > application files
default.asp (this page produces the above error)

The database is stored in a dir called "database" which is above the root for security reasons. During the setup, I had a little trouble finding the db until I used ../../database in the location field.

The overall directory structure look like;

database > db.mdb
www > directories and files

I can save to the db while logged into the admin area so I think write permissions are good and like I say, tracking any pages that are under a root "directory" seem to be ok, in other words at the same level as metatraffic2, but I cannot get it to track singles at the root.

I also tried removing the forward slash in front of metatraffic2/track.asp but still the same problem.

I'm using the latest files, downloaded on November 9, 2004.

Any thoughts folks?

Thanks... sagentm!

root pages cause db error

You need to fix the path to your database in the conn.asp file. I would change it to an absolute path such as "c:\inetpub\database". You can change this by editing line 4 of the conn.asp file:

aryMTDB(1) = "c:\inetpub\database"

This should fix the problem.

~Chad

root pages cause db error

Hi,

Thanks, unfortuneatley my host wont tell me the physical path to the database directory because they don't understand what dsn-less connections are :-(

Any thoughts on how I can retrieve that information myself?

In the interim, I ran setup again and this time left the database in the metatraffic2 directory and used the same asp tracking code in all pages, and it seems to be working, do you see any problems with this approach other than the database not being out of reach?

I also have another question which I'll start a new post for because it doesn't really relate to this.

thx... sagentm!

root pages cause db error

Hi,

Create an ASP page called something like test.asp and put the following code in it:

<%
Response.Write Server.MapPath(Request.ServerVariables("script_name"))
%>

Upload this file to your metatraffic installation directory, load the file in your web browser, and this will tell you the absolute path to your MetaTraffic installation folder. You can then just adjust this to point to the actual path of your database.

Regards,
~Chad

root pages cause db error

\\nas-001\winspace\10-endure.ca\www\path.asp which means they are doing something to hide the drive letter, I guess it's mapped or something. Anyway, thanks for the code. I guess if you see no functionality issues with having the db in the same dir, I'll leave it as is, at least there are no more errors :)

root pages cause db error

You should be able to put network paths as an absolute path to your DB as well. Try editing the conn.asp file with:

\\nas-001\winspace\10-endure.ca\database

The only issue to having the DB file in your MetaTraffic directory is that someone could download the DB file. As a last resort, you can obscure the filename atleast by naming it to some random characters such as ua528dfa89.mdb and then changing your conn.asp file accordingly.

Regards,
~Chad