Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 1st, 2005, 11:09 PM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: MapPath

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\_mmServe rScripts\Databasedb1.mdb'.

Can anyone suggest what I have done wrong or what I have missed.

Thanks.

Mal.


 
Old October 2nd, 2005, 07:06 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
mappath amged ASP.NET 1.0 and 1.1 Basics 2 July 26th, 2007 09:37 PM
Server.MapPath johanyu ASP.NET 1.0 and 1.1 Basics 0 October 19th, 2004 12:42 AM
Invalid path for MapPath kondin BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 4th, 2004 11:49 PM
Server.MapPath stu9820 Classic ASP Basics 1 January 9th, 2004 04:16 PM
server.mappath kyootepuffy Classic ASP Databases 1 September 5th, 2003 04:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.