PROBLEM
In ArcGIS Pro SDK, when attempting to perform a SQL query with an invalid SQL statement, the following error is returned:
Query Error: An invalid SQL statement was used.
The 1.4 version of Esri's Github Community samples for ArcGIS Pro SDK use the new C# 6 features that are available with Visual Studio 2015. For example, the interpolated string ($), such as in the following sample: Filter features based on attributes within an extent.
Line 143 of the Dockpane1ViewModel.cs has the following ling of code:
var whereClause = $"{SelectedField} = {quote}{FieldValue}{quote}";Notice the use of the string interpolation operator (the dollar sign, $). This operator is only supported in Visual Studio 2015 and later. Attempting to use it in Visual Studio 2013 results in a compile error. Deleting it removes the compile error, but on running the code, a runtime error is returned.
Query Error: An invalid SQL statement was used
Article ID: 000015910
Get help from ArcGIS experts
Download the Esri Support App