Fix Ops Studio issue 97 where query connection is dropped (#549)

- Fixes https://github.com/Microsoft/sqlopsstudio/issues/97.
- This should fix the bulk of the issues reported by users since it's the 1st use of this connection in the query code path.
- Implemented the fix in the connection service. This will always open a connection when calling `GetOrOpenConnection`. I cannot see a reason why the connection returned from this should ever be closed.
- resolve issues in both this code path and the edit data code path since both use this method.
This commit is contained in:
Kevin Cunnane
2017-11-21 14:46:20 -08:00
committed by GitHub
parent c512d53caa
commit 42ee96f99f
5 changed files with 105 additions and 39 deletions

View File

@@ -216,6 +216,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
public override void Close()
{
// No Op
this._state = ConnectionState.Closed;
}
public override void Open()
@@ -225,6 +226,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
{
throw new Exception("Invalid credentials provided");
}
this._state = ConnectionState.Open;
}
public override string ConnectionString { get; set; }