Is there an existing method in C# to extract the file path from a string that represents a ConnectionString
to a SqlCE
.sdf file? I want t
A bit late perhaps, but I came across this question wile struggling with the same problem. You can find the location of the |DataDirectory|
folder with AppDomain.CurrentDomain.GetData("DataDirectory")
. So your connectionstring can be translated like this:
strConn .Replace("|DataDirectory|", AppDomain.CurrentDomain.GetData("DataDirectory").ToString())