Fixing misc edit bugs (async/await, table not found) (#300)

* Async/await issue when requesting a edit/subset
* Returning good error messages when table/view doesn't exist
This commit is contained in:
Benjamin Russell
2017-03-31 13:59:44 -07:00
committed by GitHub
parent 42498446cc
commit ae178efe3e
2 changed files with 17 additions and 5 deletions

View File

@@ -77,6 +77,10 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData
// A bug in SMO makes it necessary to call refresh to attain certain properties (such as IsMemoryOptimized)
smoResult.Refresh();
if (smoResult.State != SqlSmoState.Existing)
{
throw new ArgumentOutOfRangeException(nameof(objectNamedParts), SR.EditDataObjectNotFound);
}
// Generate the edit column metadata
List<EditColumnMetadata> editColumns = new List<EditColumnMetadata>();