469,613 Members | 1,355 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Relative path in Web.Config

Hi,

I am using appSettings in Web.Config to store my connection string. However, I am not able to provide a relative path to the Access database. How can I do that?

TIA
Prateek
Nov 18 '05 #1
1 5184
Prateek,

An Access database path in a connection string must be an absolute disk
path to the database. If your database is stored within your Web content
area (and this is not advisable if possible), you can use Server.MapPath to
get a physical path to a virtual location.

Jim Cheshire, MCSE, MCSD [MSFT]
Microsoft Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Prateek" <hi@amy.com>
Subject: Relative path in Web.Config
Date: Sat, 3 Jan 2004 01:07:31 +0530
Lines: 40
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0008_01C3D195.F6AE5BA0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <Ot*************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 61.11.24.47
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!tk2msftngp13.
phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:199414
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi,
I am using appSettings in Web.Config to store my connection string. However, I am not able to provide a relative path to the Access database.
How can I do that?TIA
Prateek


Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Doug | last post: by
3 posts views Thread by mrzoab | last post: by
2 posts views Thread by Harshdeep Mehta | last post: by
8 posts views Thread by dw | last post: by
6 posts views Thread by openleren | last post: by
3 posts views Thread by JamesPaulHart | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.