OnApplyRecord and RefreshOption=roAfterUpdate

Mathias

Member
Hello Folks!

I have used the TOracleDataSet.OnApplyRecord event to save changes on a dataset coming from multiple tables. I also switched on the RefershOption roAfterUpdate. I can see that my TOracleDataSet steps into FetchRecord (called from InternalInsertUpdate) when I call Post. But it doesn't show the changes made by the trigger on the database side. What could be the reason? The TOracleDataSet and the TOracleQuery, which I use for the update, are hooked up to the same TOracleSession and its IsolationLevel is ilReadCommitted.

Any ideas why I can't see the values changed by the trigger?

Thanks for a short answer in advance.

Salut,
Mathias
 
You have to assign the changed values to the field's NewValue property. The documebted approach is actually to use the TOracleDataSet.GetQueryVariables procedure.

Alternatively, you can remove the roAfterUpdate option and simply refresh the necessary fields after processing an update in the OnApplyRecord event. This is what the PkgApply demo does after an insert, and it saves a client/server roundtrip because the insert and refresh are processed in one statement.
 
Back
Top