General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
A solution could be hooks. If TAX-RI has that integrated you may use a post hook of the update trigger to do the stock update. If TAX-RI hasn't got hooks, you may modify the source code to integrate a standard call to an empty function __ri_update_table_posthook(). This should be called by the standard ri code before some _Ri_End() function, so just before the END TRANSACTION or ROLLBACK is done depending on the overall success.
Tha AMRI RI builder has a general hook integrated in it's standard code, that has table and primary key as parameters:
*--------------------------------------------
* Insert Hook Funktion. Wird am Ende eines
* jeden Insert-Triggers aufgerufen.
*--------------------------------------------
FUNCTION _RI_InsertHook
LPARAMETERS tcTable, tuPKValue
* Hier eigene Hooks einfügen.
#IF clAUDITTRAIL
IF NOT _RI_Audit( ccINSERT, m.tuPKValue )
RETURN .F.
ENDIF
#ENDIF
RETURN .T.
ENDFUNC
*--------------------------------------------
* Update Hook Funktion. Wird am Ende eines
* jeden Update-Triggers aufgerufen.
*--------------------------------------------
FUNCTION _RI_UpdateHook
LPARAMETERS tcTable, tuPKValue
* Hier eigene Hooks einfügen.
#IF clAUDITTRAIL
IF NOT _RI_Audit( ccUPDATE, m.tuPKValue )
RETURN .F.
ENDIF
#ENDIF
RETURN .T.
ENDFUNC
*--------------------------------------------
* Delete Hook Funktion. Wird am Ende eines
* jeden Delete-Triggers aufgerufen.
*--------------------------------------------
FUNCTION _RI_DeleteHook
LPARAMETERS tcTable, tuPKValue
* Hier eigene Hooks einfügen.
#IF clAUDITTRAIL
IF NOT _RI_Audit( ccDELETE, m.tuPKValue )
RETURN .F.
ENDIF
#ENDIF
RETURN .T.
ENDFUNC
Bye, Olaf.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only