Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update Timestamp
Message
From
03/09/2015 02:25:17
 
 
To
02/09/2015 21:52:19
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01624207
Message ID:
01624218
Views:
80
>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform