473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Data Source=|DataDirectory| --> question

Sl1ver
196 100+
Quick question what does this mean "Data Source=|DataDirectory|" does that mean it automatically detects where the lets say Database is located or what?
May 15 '09 #1
3 13871
nukefusion
221 Expert 100+
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.mdb" would translate into "App_Data\Mydatabase.mdb".

Hope that helps.
May 29 '09 #2
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:
Expand|Select|Wrap|Line Numbers
  1.         <add name="db_workshopConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\db_workshop.mdb" providerName="System.Data.OleDb"/>
Now I am looking for a way to fix this issue.

Thanks
Aug 13 '09 #3
it works also for winforms
i have just tried it and it works really fine
thanx people


major
Oct 19 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: rupart | last post by:
Hi, I am planning to insert data into column depending on which column.For example i wanted insert data in row 1 column 23, and row1 column 25.. Can i use sth like this:...
9
by: GuineaPig | last post by:
Hello, I'm (very) new to c++ and I'm having trouble understanding why this doesn't work. Here's some testcode: #include <iostream.h> int main() { float test;
9
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
4
by: Ook | last post by:
I'm a but fuzzy about this. You would call it like this:Polynomial poly; // Polynomial is my class with various properties cin >> poly; In the function itself, I would, for example, do the...
1
by: Danny Ni | last post by:
Hi, I use the <asp:xml> control, xml and xslt to generate a HTML for users to input data, here is my HTML snippet in a web form: <asp:Xml id="Xml1" runat="server" TransformSource="entry.xsl"...
18
by: Sean | last post by:
I have been using List(of String) when I could easily be using a string array instead. Is it still considered best practice to use Generic list of string rather then a string array? Thanks
6
by: Mr. K.V.B.L. | last post by:
I want to start a map with keys but an empty vector<string>. Not sure what the syntax is here. Something like: map<string, vector<string MapVector; MapVector.insert(make_pair("string1",...
12
by: jayjayplane | last post by:
Thanks everybody here answered my last data field validation question about the alert of future date. Here I get another question, sorry, I am really an Access newbie... The question is : I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.