Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement