Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Problem with updating dataset
Wed, Jul 17 2013 10:19 AMPermanent Link

Juergen Goretzki

Hello again,

I got a problem with updating my dataset. Inserting works fine, but when I try to update an existing data record, I get the error message

"Database commit response error: Cannot find the row for updating:

Nr=2
Name=Test"

I tried several ways to activate the data record but neither the activation per grid nor the InitFind - Find function works. The error message happens every time.

The DataSet is open and a transaction is started. The state of the Dataset is dsUpdate. I try to update the record per Dataset.Save and there is a Database.Commit in the AfterSave procedure.

Am I missing something?

Hope you can help me.

With best regards
Wed, Jul 17 2013 12:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Juergen,

<< I got a problem with updating my dataset. Inserting works fine, but when
I try to update an existing data record, I get the error message

"Database commit response error: Cannot find the row for updating: >>

This means that:

1) The table being updated does not have primary key defined.
2) The update being passed in the commit references primary key column
values that do not exist in the table being updated.

<< I tried several ways to activate the data record but neither the
activation per grid nor the InitFind - Find function works. The error
message happens every time. >>

What do you mean by "activate" ?

<< The DataSet is open and a transaction is started. The state of the
Dataset is dsUpdate. I try to update the record per Dataset.Save and there
is a Database.Commit in the AfterSave procedure. >>

Did you modify the record at all *outside* of a transaction ?

BTW, it's not a good idea to do record-level transactions in response to
dataset events.  I initially did a video demo for EWB that did this, and
later discovered that the latency on the asynchronous Commit response can
cause some weird behaviors, especially in grids.

Tim Young
Elevate Software
www.elevatesoft.com
Image