Problem updating table with batching

Problem updating table with batching

Postby 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
xterm
 
Posts: 9
Joined: Tue 15 Nov 2005 13:24

Postby Alexey » Tue 03 Oct 2006 07:45

Try to set UpdateBatchSize property to 1.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby 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
xterm
 
Posts: 9
Joined: Tue 15 Nov 2005 13:24

Same problem different person

Postby 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.
chrisloth_tabor
 
Posts: 2
Joined: Mon 02 Oct 2006 16:42

Postby 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
xterm
 
Posts: 9
Joined: Tue 15 Nov 2005 13:24

Postby Alexey » Wed 04 Oct 2006 13:01

We are fixing this problem. Look forward to the next build.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby 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.
Serious
 


Return to dotConnect for MySQL