I am tring to connect to a local database with w winform c# application
when i set my connection string to Data: Source=C:\Users\PACKARD BELL\documents\visual studio 2010\Projects\GestionStock\MyApp\Mydb.sdf
it works fine but when i set it to Data Source=|DataDirectory|\Mydb.sdf
it dosen't work
i tried to print the connection string with the data directory variable in the console and i found that it dosen't change
i want the connection string to change with the location of the application folder
How can i do that? thanks in advance