Is there a way to query the max value from a shapefile like
srch = “MAX([TLID])”
Or would I need to iterate through the file for the largest value?
Is there a way to query the max value from a shapefile like
srch = “MAX([TLID])”
Or would I need to iterate through the file for the largest value?
I think that if you open the Shapefile as an OGR datasource, you can then use the RunQuery method, which accepts OGR SQL syntax query, including the MAX function. I can’t tell you the exact syntax off-hand for opening the Shapefile, but I know the ConnectionString is the directory name, and the Tablename is the shapefile name.
Let me know if you need more direction, and I can dig a little deeper in to the exact way of doing this.
Regards.