Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating fields in Update trigger ????
Message
 
À
16/07/1999 01:14:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00242149
Message ID:
00242161
Vues:
26
>Is it possible to use the update trigger for a table to update fields in the table that has fired the trigger.
>
>What I would like to achieve is to have the Update Trigger set a date and time field with the date & time that the record was updated. If I try to do this using the following procedure I get an error message "cannot update the cursor".
>
>PROCEDURE _TESTTABLEUPDATE
>IF _TRIGGERLEVEL > 1
> RETURN .t.
>ELSE
> REPLACE DATE WITH DATE() IN TESTTABLE
> REPLACE TIME WITH TIME() IN TESTTABLE
>ENDIF
>RETURN .t.
>
>
>Any advice gratefully received,
>
>TIA
>
>Andy

Sorry Andy,
You can''t use the update trigger to do what you want. It would result in an infinite loop. Updating the timestamp fields would fire the update trigger which would update the timestamp fields which would fire the update trigger and on and on. You can update fields in another table but not the one containing the trigger.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform