|
Subject:
|
Re: MapPath
|
|
Posted By:
|
malhyp
|
Post Date:
|
10/1/2005 11:09:39 PM
|
Gday to all. Can anyone help with the following?
I have been trying to creata a connection string and have had a few probles. I have uploaded my database to the ISP and now trying to create a DSN-Less connection string.
I belevie that to do this I must reate a MapPath to find out where my database sits.
The code I created was this.
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath ("Database") & "db1.mdb;User Id=admin;Password="
The responce I received was this.
Could not find the file \\samba\clientweb\t\i\tamseek.com.au\\www\_mmServerScripts\Databasedb1.mdb'.
Can anyone suggest what I have done wrong or what I have missed.
Thanks.
Mal.
|
|
Reply By:
|
Imar
|
Reply Date:
|
10/2/2005 7:06:52 AM
|
Is this a continuation from another thread? The subject says: Re: MapPath, but it looks like a new post to me.
Anyway, is your database located in the same folder as the connection string file is? Usually, this isn't the case so you'll need to change the MapPath method:
Server.MapPath("/Database")
will give you the physical location from a Database folder located in the root.
Server.MapPath("../Database")
gives the path to a Database folder one level up from the current folder.
HtH,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|