>>>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.
OffThere is no place like [::1]