views:

540

answers:

1

I'm using System.Data.Linq.DataContext file for accessing a mdf Database

I want to use the Database from the project directory and not the one created by the debugger in the Debug directory.

The problem is when I edit the Connection String and choose the path for AttachDBFilename, VS2008 automaticly substitutes my project directory with "|DataDirectory|"

How do I get arround this one?

+3  A: 

Edit your application "app.config" file
Go to the connectionStrings and change the connectionString to the path of your DB.

At the DataContext file properties, set the "Application Settings" = True
Then choose the Connection by it's name and that it.

DK39