Quick question what does this mean "Data Source=|DataDir ectory|" does that mean it automatically detects where the lets say Database is located or what?
Data Source=|DataDirectory| --> question
Collapse
X
-
-
Hi Sl1ver,
The special string "|DataDirectory |" normally points to the data folder in an ASP.NET application. By default I believe it is named "App_Data".
So, as an example "|DataDirectory |\Mydatabase.md b" would translate into "App_Data\Mydat abase.mdb".
Hope that helps. -
Hi,
Thanks, your post helped me. But is there any way to detect the location of data directory in the runtime?
Let me specifically explain my problem. I use typed datasets with connection to my local access database in App_Data. It works perefctly on my system, but when I transfer it to the server it stops connecting to the DB. The connection string in the web.config file is defined as:
Code:<add name="db_workshopConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\db_workshop.mdb" providerName="System.Data.OleDb"/>
ThanksComment
-
mohammad fares
happy news for winforms coders
it works also for winforms
i have just tried it and it works really fine
thanx people
majorComment
Comment