Hi,
I recently added a trigger to a table in SQLServer, that performs updates to 6 other tables when a certain field is changed. Now, when I edit and post the change in this table I get the following:
"Project … raised exception class EDAUpdatesFailedException with message ‘One or more updates failed to apply on the server’.
3161: No rows were affected by this update
Please assign a TDAReconcileProvider to the data adapter for better exception reporting and reconciliation UI)’."
Now in the trigger, the tables are not always update and the affected rows are 0. Does this connect with the exception I’m getting? If yes, is there a workaround?
this error means that update wasn’t performed.
it may happened if wrong where condition was applied.
for example this error will be raised for UPDATE ... WHERE 2=3.
if BusinessProcessor.ReferencedDataset = 'mytable' then
BusinessProcessor.ProcessorOptions := BusinessProcessor.ProcessorOptions + [poIgnoreRowsAffected];
Which tells me the current record was not found in the other six tables, but it was updated in the table with the trigger. Maybe this is what causes the error to show? It reads that 0 rows affected on top?