In reply to my own question, I've created something that works:
Layer tempLayer = ds2.ExecuteSQL("SELECT
currval(pg_get_serial_sequence('wells', 'well_id')) as seqval;", null,
null);
Feature seqFeat = tempLayer.GetNextFeature(); //always only 1 row in
the resultset, so no *while*
tempFID = seqFeat.GetFieldAsInteger("seqval");
ds2.ReleaseResultSet(tempLayer);
Is it necessary to call ReleaseResultSet after every ExecuteSQL? Or
only after the last one?
Cheers,
Tom
On Wed 08/09/10 16:03 , Tom van der Putte [email protected] sent:
Hi All,
I'm adding several new features to a PostGIS table using OGR (in
C#). After each CreateFeature I'd like to somehow get the FID of the
created feature. Is there any possible way to do this? If not elegant,
any hack is also welcome :D
Cheers,
Tom
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev