Overriding default insert/update/delete mechanism

Risto

Member
TQuery class has a member variable UpdateObject of type TUpdateSQL. I can use it for updating otherwise unupdateable queries when cached updates are enabled. Is there such mechanism in DOA so that I could provide my own database procedure calls which would be used for insert, update and delete operations on a recordset?
 
You can use the OnApplyRecord event for this, and the methods that support this event (SetQueryVariables, GetQueryVariables). The PkgApply example project demonstrates this. It takes a cursor result set from a package, and inserts, updates, and deletes records through program units in the same package.

------------------
Marco Kalter
Allround Automations
 
Back
Top