[gdal-dev] OGR and Delphi. OGRReleaseDatasource problem
Frank Warmerdam
warmerdam at pobox.com
Wed Oct 6 15:00:17 EDT 2010
Alexander Bruy wrote:
> Hi,
>
> I've develop some GIS tools with Delphi and want to use GDAL/OGR. I can't find
> any existing Pascal bindings, so I start to write them by myself. Now
> I have ObjectPascal
> (Delphi and FreePascal compatible) bindings for OGR.
>
> When I compile and run small test application (simply open a shape,
> display number of features
> and table shema) I find that OGRReleaseDatasource return error code 6
> instead OGR_ERRNONE.
> Why? Maybe there are bugs in test application or in my bindings? Can
> anyone look at this?
Alexander,
OGRReleaseDatasource() is appropriate for use with OGROpenShared().
If you are just calling OGROpen() you should instead call
OGR_DS_Destroy(). OGRReleaseDataSource() will return an error if
called with a non-shared datasource.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list