Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to update a field automatically ?
Message
 
 
To
21/11/2008 08:04:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01363438
Message ID:
01363471
Views:
14
>this is what i have done :
>
>function majtable
> replace DATECUR with date()
>endfunc
>
>in the table designer, i put majtable() on the validation rule.
>the resulte is that, when i append or edit a record all records take the same value in the DATECUR field.
>
>to correct that, i put that code on the update trigger.
>but after updated an error appears that the table in read only.
>
>what is the solution ?

Try to add the table rule programmatically using NOVALIDATE option to not update the existing records.

ALTER TABLE myTable SET CHECK 'MajTable' NOVALIDATE
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform