Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run a fuction when a specific field in a table is update
Message
 
À
26/09/1998 06:17:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00141105
Message ID:
00141160
Vues:
30
You can do this in a stored procedure called in the field validation rule. For example; put myRule(DateAndHourIn, DateAndhourOut) in the field validation rule for DateAndhourOut, and enter the following code in a stored procedure in the database:
procedure myRule
lparameter dtTimeIn, dtTimeOut
insert into test2(TotalTime) values(((dtTimeOut - dtTimeIn)/60)/60)
return .t.
This would record the elapsed time in hours in a table called test2 whenever the DateAndhourOut field is changed.

HTH

>Hi All
>
>I have a table with some fields:
>dateandhourin dateandhourout employee dep jobb
>DT DT N N N
>When the field hourout is filled with a datetime I want
>to run a function to do some calculation on the record.
>The result off my calculation is put into another table.
>
>I dont think I can use Triggers.
>I dont think I can use Field validate
>
>Is there a solution for my problem
>
>Best regards
>Per Simmersholm
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform