Hi,
After connecting to the FGDB database in ArcGIS Pro SDK, I attempted to run the QueryFilter. I believe the error is due to the subfields, however I'm not sure if this is the correct method to write QueryFilter.Subfileds in the FGDB database. I've included the code below.
Error message - "A column was provided that does not exist,"
Could someone please help me out with this?
-----------code---------------------------
var featureClassAsSubEvtTableName = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(rootFolder))).OpenDataset<Table>((tableName));
QueryFilter queryFilterSubEvtSelected = new QueryFilter();
queryFilterSubEvtSelected.SubFields = $"{selectedColumnsForWhereClause}, MIN({fromMeasure}) AS {fromMeasure}";
queryFilterSubEvtSelected.WhereClause = $"LOWER({routeId}) = LOWER('{selectedLineId}')";
queryFilterSubEvtSelected.PostfixClause = $"group by {selectedColumnsForWhereClause}";
using (RowCursor rowCursorSubEvtMeasure = featureClassAsSubEvtTableName.Search(queryFilterSubEvtSelected, false))
{
//code here
}
----------------------------------------------------------------------------------
Thanks in Advance!
Hi Shabina,
Table.Search doesn't support functions such as "Min()". Check out the Table.CalculateStatistics method instead.
I hope this helps,
--Rich