Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trigger handling
Message
From
17/05/2005 07:44:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
17/05/2005 06:18:01
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:
01014829
Views:
24
AMRI seems like an interesting alternative. Where can I get that? Is it freeware?

>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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform