Problem updating table with batching

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
xterm
Posts: 9
Joined: Tue 15 Nov 2005 13:24

Problem updating table with batching

Post by xterm » Mon 02 Oct 2006 14:25

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

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 03 Oct 2006 07:45

Try to set UpdateBatchSize property to 1.

xterm
Posts: 9
Joined: Tue 15 Nov 2005 13:24

Post by xterm » Tue 03 Oct 2006 13:09

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

chrisloth_tabor
Posts: 2
Joined: Mon 02 Oct 2006 16:42

Same problem different person

Post by chrisloth_tabor » Tue 03 Oct 2006 17:58

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.

xterm
Posts: 9
Joined: Tue 15 Nov 2005 13:24

Post by xterm » Wed 04 Oct 2006 09:41

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

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 04 Oct 2006 13:01

We are fixing this problem. Look forward to the next build.

Serious

Post by Serious » Thu 05 Oct 2006 12:16

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.

Post Reply