Thanks for checking, always good to understand why things happen as they do.
One of the workarounds will do for me, so I'll use them in my application.
Arno
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/SetAttributeFilter-and-OSM-tp5096352p5096417.html
Sent from the GDA
> As you can see the second time I set an attribute filter in the loop it
> returns all 341 features on the layer, not only the 321 that match the
> filter. In all other cases it seems to work fine.
>
> Did I go something wrong with in my code? Do I need to call some other
> commands maybe before
Even,
Thanks for the quick answer.
I did some more testing. When using ogr2ogr it works fine indeed. When I use
the ExecuteSQL it also works fine. And it seems to only fail the second time
I call SetAttributeFilter.
Here is some test code I use:
using System;
using System.Collections.Generic;
u