[gdal-dev] SDE Write forces a value into the FID Column
Craig Hunter
craigrthunter at gmail.com
Fri Jan 28 18:48:52 EST 2011
Hi,
I've been working with the GDAL/OGR 1.7.3 release and writing geometries to
SDE when I ran into an issue. The code forces a value into a SDE table's
primary key field by automatically incrementing records starting with the
value of 1. I don't see this as a practical implementation because it only
works with an empty SDE layer when you initially load data. It causes a
-51/Underlying DMBS error when you attempt to append data onto the layer if
those primary key values are in use, and prevents other implementations for
handling primary key generation. I handle auto-population of a primary key
through a BIR (Before-Insert-Record) trigger by querying the next value from
an Oracle Sequence when a NULL value is encountered on the insert
statement. I've commented out the parts of the code in my build, so as not
to force the FID column to have a value, but I think this should be adopted
by the SDE driver.
Thanks,
Craig.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110128/3dcb2896/attachment.html
More information about the gdal-dev
mailing list