Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with index in VFP9.0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00973359
Message ID:
00973369
Vues:
25
>The following index in VFP9.0 beta worked fine when doing an insert into the table:
>
>ALLTRIM(STR(add_type))+DTOC(startd8)+ALLTRIM(STR(fk_patients))
>
> ...
>
>Can anyone give me a hint as to why the above index is giving me trouble?

Not sure whether this is the reason for your error, but variable-length index expressions are not supported. VFP pads them (see the "Considerations for Creating Index Expressions" topic in VFP 9 help, where you will find, among other things, "Visual FoxPro does not support variable length index keys. If you attempt to build an index with a key that varies in length, the key is padded with spaces.")

My point being, since your index will be padded to fixed-lengh anyway, you may be able to correct the problem by removing the ALLTRIM() function calls or by using TRANSFORM() or PAD() instead of STR(). Barring a definitive answer on why you get the error using your expression, perhaps a different expression may "just work."

Kelly
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform