mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-16 17:23:38 -05:00
Addressing feedback
This commit is contained in:
@@ -21,6 +21,15 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
/// </summary>
|
||||
public class Query : IDisposable
|
||||
{
|
||||
#region Constants
|
||||
|
||||
/// <summary>
|
||||
/// "Error" code produced by SQL Server when the database context (name) for a connection changes.
|
||||
/// </summary>
|
||||
private const int DatabaseContextChangeErrorNumber = 5701;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
@@ -146,10 +155,10 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
{
|
||||
await conn.OpenAsync();
|
||||
|
||||
if (conn.GetType() == typeof(SqlConnection))
|
||||
SqlConnection sqlConn = conn as SqlConnection;
|
||||
if (sqlConn != null)
|
||||
{
|
||||
// Subscribe to database informational messages
|
||||
SqlConnection sqlConn = conn as SqlConnection;
|
||||
sqlConn.InfoMessage += OnInfoMessage;
|
||||
}
|
||||
|
||||
@@ -161,11 +170,6 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// "Error" code produced by SQL Server when the database context (name) for a connection changes.
|
||||
/// </summary>
|
||||
private const int DatabaseContextChangeErrorNumber = 5701;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for database messages during query execution
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user