Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update Timestamp
Message
De
02/09/2015 21:52:19
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
02/09/2015 21:45:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01624207
Message ID:
01624215
Vues:
61
>>>Hi All,
>>>
>>>This is going to sound real stupid. Sorry. How do I set up a field in a table so that every time a record is updated, this field is updated with the current date/time?
>>>
>>>Also, I need for this to work in VFP 5.0 as well.
>>>
>>>Thanks,
>>>
>>>Yossi
>>
>>In addition to Naomis reply. Note that the timestamp will be that of the local machine.
>>
>>An update trigger will do the job, but you need a database to wrap your tables
>>This will work from inside VFP only
>
>Please excuse my ignorance, but how does the update trigger accomplish what I want. It's asking for a logical expression.

No problem, I have to lookup the help myself. I've done such stuff through my framework, so I'm not an expert here.
from
HELP CREATE TRIGGER
[snip]
Specifies the logical expression evaluated when the trigger occurs. lExpression can be a user-defined function or a stored procedure that returns a logical value.
[/snip]

you create a function in the database (aka stored procedure)
parameter is table name
this fundtion replaces datetime value
and create logical return value

HTH
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform