Use new generic property (ActiveDatabase) to access the current database name. Info in email message
This commit is contained in:
parent
3a7667d9b7
commit
f8aad3efbc
@ -119,9 +119,9 @@ namespace Volian.Controls.Library
|
||||
Match mServer = Regex.Match(connectionString, ".*Data Source=([^;]*).*");
|
||||
string server = (mServer.Success) ? mServer.Groups[1].Value : "unknown";
|
||||
if (server.StartsWith(@".\")) server = @"Local \ " + server.Substring(2);
|
||||
string databaseName = Database.SelectedDatabase;
|
||||
string databaseName = Database.ActiveDatabase;
|
||||
sb.Append(string.Format("SQL Server: {0}", server));
|
||||
if (databaseName == null) databaseName = Regex.Replace(connectionString, "^.*Initial Catalog=([^;]*);.*$", "$1", RegexOptions.IgnoreCase);
|
||||
//if (databaseName == null) databaseName = Regex.Replace(connectionString, "^.*Initial Catalog=([^;]*);.*$", "$1", RegexOptions.IgnoreCase);
|
||||
sb.AppendLine(string.Format("\t\tDatabase: {0}", databaseName));
|
||||
if (OutlookEmail)
|
||||
sb.AppendLine("sent via outlook");
|
||||
|
Loading…
x
Reference in New Issue
Block a user