<div dir="ltr"><div>Thank you for your reply.</div><div><br></div><div>Indeed, I had just coded a solution using IDENT_CURRENT. :-/</div><div><br></div><div>However, I have taken your advice and recoded it using the OUTPUT clause, and it is working well.</div><div><br></div><div>Unless I hear otherwise from someone within GDAL that it is not necessary, I will submit a pull request for consideration.</div><div><br></div><div>Again, thank you.</div><div>Jerry.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 25, 2018 at 4:45 PM Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 26 Oct 2018 at 02:30, Jerry Faust <<a href="mailto:jerryfaust1@gmail.com" target="_blank">jerryfaust1@gmail.com</a>> wrote:<br>
><br>
> Hello.<br>
><br>
><br>
><br>
> 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.<br>
><br>
><br>
><br>
> 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).<br>
><br>
><br>
><br>
> Before I consider making changes, I wonder if I’m just missing something. It would seem that others would have encountered this before.<br>
<br>
Coincidentally I fixed a similar issue in QGIS this week -<br>
<a href="https://github.com/qgis/QGIS/commit/972250" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/commit/972250</a> . If you go ahead with<br>
adapting GDAL my advise here would be to use an OUTPUT clause in your<br>
INSERT instead of using the widespread IDENT_CURRENT approach (for<br>
some reasons outlined in that commit's message).<br>
<br>
Nyall<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>Jerry.<br></div>