Rowupdating error


So, I think the bug is not in the Table Adapter runtime code, but in the Table Adapter design time. I've struggled many times with this bug, and I can confirm that it is present in 6.0.3 as well. I'm using VS2008, Windows XP, My SQL Connector/NET 6.0.3.Has there been any progress on this front, or is there some workaround? Table Adapters in the designer are completely useless for anything more than SELECT statements, until this is fixed. 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.

rowupdating error-61rowupdating error-57

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.

Update(Data Table) does not refresh the Primary Key of just added rows : if I read the Data Table after the Update, Primary Keys values are false. Fill(Data Table) before Updates, it's work, but I do not want to retreive hundred of rows before add one or two rows. Connector/Net 5.2.2 Visual Studio 2005 Windows Vista Hi Tonci, I'm writing a test case.

But I think the simple explanation is in the "Advanced option" of the Table Adapter configuration dialog.

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.