This is probably going to be a simple answer, but im having some trouble formatting an SQL query in C#.
I need to query a featuretable and pick out a feature that has a matching "fips".
the feature name is a string, example shows a number but they can be strings.
When I use the following code, I keep getting a return (featureresult2) of ALL the features in the table. I have tried a few different ways of phrasing the query, but it seems I am missing something.
name = S.UniqueID;
//Lets look up the geometry
string s = "fips";
string columnName = s;
string searchString = name;
// string sqlQuery = $"{columnName} = {searchString}";//Returning all
string sqlQuery = "fips = '270530265081'"; //Testing simple, still returning all
QueryParameters queryParams = new QueryParameters //Selects the fips
{
WhereClause = sqlQuery
};
FeatureQueryResult featureResult2;
featureResult2 = (BlockGroupGeoPackage.GeoPackageFeatureTables[0].QueryFeaturesAsync(queryParams).GetAwaiter().GetResult());