Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update Timestamp
Message
De
03/09/2015 02:25:17
 
 
À
02/09/2015 21:52:19
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
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:
01624218
Vues:
78
>>>>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


As far as I know, a trigger cannot replace anything in the record that caused it to fire
You'll have to use a table rule
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform