Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trigger handling
Message
From
17/05/2005 06:18:01
 
 
To
16/05/2005 22:00:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01014364
Message ID:
01014820
Views:
21
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
Map
View

Click here to load this message in the networking platform