Re: [gdal-dev] Distinguish between empty result and error with OGRDataSource::ExecuteSQL

2011-10-26 Thread Frank Warmerdam
On Wed, Oct 26, 2011 at 9:39 AM, Dan Homerick wrote: > The OGRDataSource documentation > (http://www.gdal.org/ogr/classOGRDataSource.html#a6acc228db6513784a56ce12334a8c33) > states that NULL is returned for statements "that have no results > set", which is subtly different than what I initially cl

Re: [gdal-dev] Distinguish between empty result and error with OGRDataSource::ExecuteSQL

2011-10-26 Thread Dan Homerick
On Tue, Oct 25, 2011 at 7:54 PM, Frank Warmerdam wrote: > On 11-10-25 04:50 PM, Dan Homerick wrote: >> The ExecuteSQL method returns NULL when an error occurs, or if the >> statement result is just empty... > > The normal approach to distinguishing would be to call CPLErrorReset() > before calling

Re: [gdal-dev] Distinguish between empty result and error with OGRDataSource::ExecuteSQL

2011-10-25 Thread Frank Warmerdam
On 11-10-25 04:50 PM, Dan Homerick wrote: GDAL-Dev, The ExecuteSQL method returns NULL when an error occurs, or if the statement result is just empty. I don't see any methods to get information on the last error, which leaves me wondering if there's a good way to distinguish the different causes

[gdal-dev] Distinguish between empty result and error with OGRDataSource::ExecuteSQL

2011-10-25 Thread Dan Homerick
GDAL-Dev, The ExecuteSQL method returns NULL when an error occurs, or if the statement result is just empty. I don't see any methods to get information on the last error, which leaves me wondering if there's a good way to distinguish the different causes for a NULL result. I've been prototyping u