Hi
I am trying to use the query tool but can’t get it to work
I have loaded a shapefile into a ShapeFileLayer and then try to get a distinct list of values from one of the columns
ShapeFileFeatureLayer.BuildIndexFile(file, BuildIndexMode.DoNotRebuild);
var layer =
new
ShapeFileFeatureLayer(file, ShapeFileReadWriteMode.ReadOnly);
layer.Open();
// set style categories
var sql = String.Format(
“Select distinct [{0}] from [{1}]”
, CategoryColumn, file);
var columns = layer.QueryTools.ExecuteQuery(sql);
This however does not work
Is this not the correct way to do this?
Thanks
Murray