By setting this property to true, the proper select statement will be included and the generated command object will have its Updated Row Source property set.
To this end, we've added a custom property to My Sql Command Builder called Return Generated Identifiers.
When you sign in to comment, IBM will provide your email, first name and last name to DISQUS.
The third checkbox "Actualiser les données" (Update data after Insert or Update) is not remembered. First Returned Record End Sub Bit of a hack, but as long as I fix the tableadapters this way, they do function correctly.
To get auto incremented value updated in the datatable after used tableadapter. But when I check it, then close all dialogs (OK, Terminate) and reopen the dialog, the checkbox is not checked anymore. The option to configure the tableadapters to refresh after inserting doesn't seem to do anything.
If that parameter is null, then I assume we are generating new commands.
Connector/Net 1.0 had some syntax for this but starting with Connector/Net 5.0 that all changed. Net 2.0 API, Microsoft did not directly provide for any type of API that users could use for selecting this. Second, the command object must have its Updated Row Source property set to Both or First Returned Record.
We will be removing the Return Identifiers property in 6.1 and moving to a more Sql Client way of doing things.
If people like what we do with 6.1 then we will consider backporting this to 5.2 and 6.0.
That worked for me, but only when the column that was autoincremented was named 'id'. NET: Public Shared Sub Fix Data Adapter Insert Command(By Val adapter As My Sql Data Adapter, By Val auto Increment Column As Data Column) Dim final Select As String = "; SELECT last_insert_id() AS '" & auto Increment Column. You can access the patch from: 709 Reggie Burnett 2009-08-24 - adding a pretty nasty hack to enable output of a refresh select on the end of our insert statements when they are generated by the Table Adapter config wizard (bug #37865)fixed in 5.2.8, 6.0.5, and 6.1.2 This is not really a good "fix" but a hack that should help.
The problem is that the base class Db Command Builder doesn't expose the command building mechanism as virtual so you can't hook into it. Also, the table adapter config wizard is hard coded to only add a final select when dealing with Sql Server.