mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-15 17:23:32 -05:00
Do not use ReliableCommand in the query execution service (#66)
* Do not use ReliableCommand in the query execution service. * Fixing the logic to remove InfoMessage handlers from ReliableSqlConnection * Adding test to query UDT
This commit is contained in:
@@ -195,10 +195,21 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
sqlConn.GetUnderlyingConnection().InfoMessage += OnInfoMessage;
|
||||
}
|
||||
|
||||
// We need these to execute synchronously, otherwise the user will be very unhappy
|
||||
foreach (Batch b in Batches)
|
||||
try
|
||||
{
|
||||
await b.Execute(conn, cancellationSource.Token);
|
||||
// We need these to execute synchronously, otherwise the user will be very unhappy
|
||||
foreach (Batch b in Batches)
|
||||
{
|
||||
await b.Execute(conn, cancellationSource.Token);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (sqlConn != null)
|
||||
{
|
||||
// Subscribe to database informational messages
|
||||
sqlConn.GetUnderlyingConnection().InfoMessage -= OnInfoMessage;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Close connection after eliminating using statement for above TODO
|
||||
|
||||
Reference in New Issue
Block a user