Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to update a field automatically ?
Message
 
 
À
21/11/2008 08:04:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01363438
Message ID:
01363471
Vues:
13
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform