2013-05-03 3 views

ответ

1
public static string GetFilePathFromConnectionString(string connectionString) 
{ 
    var attachDbFileName = new SqlConnectionStringBuilder(connectionString).AttachDBFilename; 
    return attachDbFileName.Replace("|DataDirectory|", AppDomain.CurrentDomain.GetData("DataDirectory").ToString()); 
}