Hi,

What is the best way to update a field whenever a new record is inserted or
updated?

i got VFP 9.

i tried the update/insert triggers, but during the trigger, the table header
appears to be locked?!

Kan

Re: insert / update triggers by Fred

Fred
Wed Oct 05 10:15:28 CDT 2005

You can't use the triggers to modify a field in the table that caused the
trigger, that would cause an endless loop. You need to use a validation
rule.

--
Fred
Microsoft Visual FoxPro MVP


"Kan Kan" <nospam4me@your.com> wrote in message
news:uAB5JMYyFHA.3812@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> What is the best way to update a field whenever a new record is inserted
> or
> updated?
>
> i got VFP 9.
>
> i tried the update/insert triggers, but during the trigger, the table
> header
> appears to be locked?!
>
> Kan
>
>



Re: insert / update triggers by Anders

Anders
Wed Oct 05 17:03:48 CDT 2005

CREATE TABLE x (xx C(2) DEFAULT 'XX', ... )
You can add defaults in the Table Designer window. For views there's a place
in the View Deszigner.
-Anders

"Kan Kan" <nospam4me@your.com> skrev i meddelandet
news:uAB5JMYyFHA.3812@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> What is the best way to update a field whenever a new record is inserted
> or
> updated?
>
> i got VFP 9.
>
> i tried the update/insert triggers, but during the trigger, the table
> header
> appears to be locked?!
>
> Kan
>
>



Re: insert / update triggers by Kan

Kan
Thu Oct 06 05:34:44 CDT 2005

Thank you.
I managed to get it done using the Record and Field Rules

Kan

"Anders" <anders@anders> wrote in message
news:#DevuhfyFHA.664@tk2msftngp13.phx.gbl...
> CREATE TABLE x (xx C(2) DEFAULT 'XX', ... )
> You can add defaults in the Table Designer window. For views there's a
place
> in the View Deszigner.
> -Anders
>
> "Kan Kan" <nospam4me@your.com> skrev i meddelandet
> news:uAB5JMYyFHA.3812@TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > What is the best way to update a field whenever a new record is inserted
> > or
> > updated?
> >
> > i got VFP 9.
> >
> > i tried the update/insert triggers, but during the trigger, the table
> > header
> > appears to be locked?!
> >
> > Kan
> >
> >
>
>