mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Create database task helper uses current db instead of default (#584)
This commit is contained in:
@@ -217,6 +217,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Admin
|
|||||||
false,
|
false,
|
||||||
connectionDetails.UserName,
|
connectionDetails.UserName,
|
||||||
passwordSecureString,
|
passwordSecureString,
|
||||||
|
connectionDetails.DatabaseName,
|
||||||
xmlDoc.InnerXml);
|
xmlDoc.InnerXml);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -227,6 +228,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Admin
|
|||||||
true,
|
true,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
connectionDetails.DatabaseName,
|
||||||
xmlDoc.InnerXml);
|
xmlDoc.InnerXml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -684,7 +684,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Admin
|
|||||||
/// <param name="userName">User name for not trusted connections</param>
|
/// <param name="userName">User name for not trusted connections</param>
|
||||||
/// <param name="password">Password for not trusted connections</param>
|
/// <param name="password">Password for not trusted connections</param>
|
||||||
/// <param name="xmlParameters">XML string with parameters</param>
|
/// <param name="xmlParameters">XML string with parameters</param>
|
||||||
public CDataContainer(ServerType serverType, string serverName, bool trusted, string userName, SecureString password, string xmlParameters)
|
public CDataContainer(ServerType serverType, string serverName, bool trusted, string userName, SecureString password, string databaseName, string xmlParameters)
|
||||||
{
|
{
|
||||||
this.serverType = serverType;
|
this.serverType = serverType;
|
||||||
this.serverName = serverName;
|
this.serverName = serverName;
|
||||||
@@ -692,7 +692,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Admin
|
|||||||
if (serverType == ServerType.SQL)
|
if (serverType == ServerType.SQL)
|
||||||
{
|
{
|
||||||
//does some extra initialization
|
//does some extra initialization
|
||||||
ApplyConnectionInfo(GetTempSqlConnectionInfoWithConnection(serverName, trusted, userName, password), true);
|
ApplyConnectionInfo(GetTempSqlConnectionInfoWithConnection(serverName, trusted, userName, password, databaseName), true);
|
||||||
|
|
||||||
//NOTE: ServerConnection property will constuct the object if needed
|
//NOTE: ServerConnection property will constuct the object if needed
|
||||||
m_server = new Server(ServerConnection);
|
m_server = new Server(ServerConnection);
|
||||||
@@ -1031,7 +1031,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Admin
|
|||||||
string serverName,
|
string serverName,
|
||||||
bool trusted,
|
bool trusted,
|
||||||
string userName,
|
string userName,
|
||||||
SecureString password)
|
SecureString password,
|
||||||
|
string databaseName)
|
||||||
{
|
{
|
||||||
SqlConnectionInfoWithConnection tempCI = new SqlConnectionInfoWithConnection(serverName);
|
SqlConnectionInfoWithConnection tempCI = new SqlConnectionInfoWithConnection(serverName);
|
||||||
tempCI.SingleConnection = false;
|
tempCI.SingleConnection = false;
|
||||||
@@ -1047,6 +1048,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Admin
|
|||||||
tempCI.UserName = userName;
|
tempCI.UserName = userName;
|
||||||
tempCI.SecurePassword = password;
|
tempCI.SecurePassword = password;
|
||||||
}
|
}
|
||||||
|
tempCI.DatabaseName = databaseName;
|
||||||
|
|
||||||
return tempCI;
|
return tempCI;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user