Page 1 of 1

Problem updating table with batching

Posted: Mon 02 Oct 2006 14:25
by xterm
When i try to update data from two or more different records in single table

Code: Select all

Me.Trigono_dataBindingSource.EndEdit()
Me.Trigono_dataTableAdapter.Update(Me.GpsDataSet.trigono_data)
i get the following error

"When batching, the command's UpdatedRowSource property value of UpdateRowSource.FirstReturnedRecord or UpdateRowSource.Both is invalid."

I haven't changed any property for batching or anything related to it.


VS 2005,VB.NET,Mysql Corelab 3.50.13

Posted: Tue 03 Oct 2006 07:45
by Alexey
Try to set UpdateBatchSize property to 1.

Posted: Tue 03 Oct 2006 13:09
by xterm
Yes i know that i must do that. I am asking why it is happenning?I created a test DB project from the designer without writing any code and i have this error.Why?

George

Same problem different person

Posted: Tue 03 Oct 2006 17:58
by chrisloth_tabor
I'm jumping to this thread as I am having a similar problem. I am generating the same error whenever I issue a delete command preceding update regardless of any other commands I do or do not issue.

Part 2, can you explain to an idiot how and where to go about changing the UpdateBatchSize.

Posted: Wed 04 Oct 2006 09:41
by xterm
The UpdateBatchSize property as other properties related to batching exist ont MySqlDataAdapter. So if you created MySqlDataAdapter from code you just do

Code: Select all

adapter = New CoreLab.MySql.MySqlDataAdapter
adapter.UpdateBatchSize=1
Otherwise If you use designer your adapter is created automatically and exist
in your *DataSet.Designer.vb. There under InitAdapter() sub you can set

Code: Select all

_adapter.UpdateBatchSize=1

Posted: Wed 04 Oct 2006 13:01
by Alexey
We are fixing this problem. Look forward to the next build.

Posted: Thu 05 Oct 2006 12:16
by Serious
We have fixed this problem for the MySQLDirect .NET.
Look forward for the next build.
Otherwise If you use designer your adapter is created automatically and exist in your *DataSet.Designer.vb. There under InitAdapter() sub you can set ...
Do not edit the automatically generated code. Correct way is to set UpdateBatchSize in the property editor.