Thank you for your reply. Indeed, I had just coded a solution using IDENT_CURRENT. :-/
However, I have taken your advice and recoded it using the OUTPUT clause, and it is working well. Unless I hear otherwise from someone within GDAL that it is not necessary, I will submit a pull request for consideration. Again, thank you. Jerry. On Thu, Oct 25, 2018 at 4:45 PM Nyall Dawson <[email protected]> wrote: > On Fri, 26 Oct 2018 at 02:30, Jerry Faust <[email protected]> wrote: > > > > Hello. > > > > > > > > I created a few tables in SQL Server by importing Shapefiles using > ogr2ogr. I am able to edit the features, but have not been able to add new > features. > > > > > > > > After stepping through the code, it appears that after successfully > inserting the record, the newly assigned FID is not being set into the > feature - it is still -1 (OGRNullFID). > > > > > > > > Before I consider making changes, I wonder if I’m just missing > something. It would seem that others would have encountered this before. > > Coincidentally I fixed a similar issue in QGIS this week - > https://github.com/qgis/QGIS/commit/972250 . If you go ahead with > adapting GDAL my advise here would be to use an OUTPUT clause in your > INSERT instead of using the widespread IDENT_CURRENT approach (for > some reasons outlined in that commit's message). > > Nyall > -- Jerry.
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
