Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restore default value to fields?
Message
 
À
02/09/2006 18:11:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01150539
Message ID:
01150569
Vues:
30
Thanks for the emotional support, Fabio.

I ended up forcing a recalc of the field by using:
REPLACE ALL picture WITH EVALUATE(DBGETPROP("&lcImportTable..picture","FIELD","DefaultValue"))
picture is the name of the field, and lcImportTable is the name of the table I'm appending to.

It seems to do the job, but of course requires another scan of the imported records. Fortunately, the number of records is only a few thousand.

>>I'm doing an APPEND from a text file to a table, and I have defined a Default Value for one of the table fields - but the field remains blank after the import.
>>
>>The default value includes the concatenation of other fields.
>>
>>I presume VFP doesn't have the other field values until the record is imported - and by that time it's too late to calculate the default value???
>>
>no. if true, then vfp it would produce an error because default is undef.
>
>It don't do this, and it is a bug for me.
>
>>Anyway... is there any way for me to force all those empty fields to be populated with the default value I have defined for the field?
>>
>
>no.
>
>if it can help:
>
>...
>APPEND FROM textfile.txt
>BLANK ALL FIELDS ... DEFAULT
>
>
>>TIA
>>Michael
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform