[gdal-dev] Ogr: Difference betwen SQLexectue() and SetAttributFilter() ?

Benjamin benjamin.lux at maxsea.fr
Mon Jul 23 02:19:48 PDT 2012


Hi,

There is a difference betwen :

layer = ds.ExecuteSQL("SELECT * FROM MY_TABLE WHERE ID='my_id'", null, "");

And 

layer = ds.GetLayerByName("MY_TABLE");
layer.SetAttributeFilter("ID='my_id'");

?

When you fetch your feature with layer.getNextFeature(), there are numerous
request with the 2nd way ?

Links :
http://www.gdal.org/ogr/classOGRDataSource.html#aa6acc228db6513784a56ce12334a8c33
http://www.gdal.org/ogr/classOGRLayer.html#acb2c6cc5fa3577df5be538284c1b0dde

Best regards,
Benjamin.




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-Ogr-Difference-betwen-SQLexectue-and-SetAttributFilter-tp4990004.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list