Questions tagged [datadirectory]

DataDirectory broadly covers where an application expects to find data files and where an installer puts data files.

DataDirectory broadly covers where an application expects to find data files and where an installer puts data files.

62 questions
64
votes
6 answers

ADO.NET |DataDirectory| where is this documented?

In AppConfig it is possible to use |DataDirectory| but I can't find any doc ?
programmernovice
  • 3,841
  • 11
  • 43
  • 63
18
votes
3 answers

Connection String to Connect to .MDF

I've created a new project in VS2008, and added a .MDF file to the project. This is the first time I've tried to use the MDF files and .SQLEXPRESS databases (I've always used extenal Oracle servers in the past). I'm trying to document everything as…
kdmurray
  • 2,988
  • 3
  • 32
  • 47
16
votes
1 answer

postgresql can not start after change the data_directory

I use postgresql on Debian. The postgresql service can not start after I edit the config file: #data_directory = '/var/lib/postgresql/9.4/main' # use data in another directory data_directory = '/opt/data/postgresql/data' (yeah,I just…
Billy Yang
  • 357
  • 4
  • 14
12
votes
0 answers

Spurious files in my application's data directory

I recently added a Samsung Galaxy Note 4 to my device collection. I have an app that stores data files in its "home" directory, and I notice that this particular device keeps creating extraneous files in that directory. I've been running on other…
10
votes
3 answers

How to define DataDirectory for ConnectionString in console application to work with EntityFramework Code First Migrations

I try to set location MyProject\App_Data\Cos.mdf for the database in App.config:
Yoda
  • 17,363
  • 67
  • 204
  • 344
8
votes
1 answer

AppDomain.CurrentDomain.GetData("DataDirectory") always returns Null

In my program, I need to copy a template database from the default location, which I understand will be different depending on the installer I choose to use. The problem is that I can't seem to read the actual path of |DataDirectory| I understand…
PAUL DUFRESNE
  • 348
  • 3
  • 4
  • 11
7
votes
2 answers

Unable to restart mysql after changing the datadir

I am unable to restart the server after changing the default datadir from C:/ProgramData/MySQL/MySQL Server 5.7\Data to D:/Data. I changed datadir to datadir="D:/Data" Then I stopped mysql Copied the Data directory to D:/ Attempted to restart the…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
7
votes
2 answers

SQL Server Compact 'Data Directory' macro in Connection String - more info needed

So, as described on this msdn page, when you define a Connection String for SQL Server Compact 3.5, you can use the "Data Directory" macro, like this: quote from this msdn page: Data Directory Support SQL Server Compact 3.5 now supports the Data…
codeulike
  • 22,514
  • 29
  • 120
  • 167
6
votes
1 answer

Can't create/write to file - Error code 13 in linux

Iam trying to create a mysql table in linux with changing data directory to another location. The selected forlder having full permission. But I got an error 'Can't create/write to file'. I googled and found that this error related to permission…
Haseena
  • 484
  • 2
  • 11
  • 25
5
votes
3 answers

How do I read the current path of |DataDirectory| from config settings

I'm writing a program that requires the user to select the active database at application startup. I have a Windows Form that will list the databases stored in a sub-folder of ApplicationData specifically for storing the database files. When I…
PAUL DUFRESNE
  • 348
  • 3
  • 4
  • 11
4
votes
1 answer

How change location of |DataDirectory| in ASP.NET application built in C#

Possible Duplicate: Using a relative path in connection string for Access DB in C# This is my current connection string in web.config
Un Known
  • 179
  • 1
  • 3
  • 15
3
votes
1 answer

How to use |DataDirectory| substitution string in appsettings.json with asp.net core?

I'm new to asp.net core and the task I want to do should be very simple. Using Visual Studio, I'm trying to link a .mdf file to my project as a local database. As I want to make it work for several computers, I need to find the data directory folder…
Pierrhum
  • 61
  • 1
  • 6
3
votes
1 answer

Default MVC Web Application Database

When setting up a new ASP.NET MVC Web Application, the default connection string inside Web.Config is something like this: connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User…
wows
  • 10,687
  • 7
  • 27
  • 27
3
votes
1 answer

MySQL won't start after data dir move.

I am running MySQL 5.1 on Ubuntu 10.04, and until recently, I used the default data dir location. Some other parts of the config file were tuned for performance, but the paths stayed default. Recently, I started running out of space and decided to…
Iv4n
  • 359
  • 1
  • 4
  • 18
1
2 3 4 5