Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Index Error
Message
De
22/04/2013 09:58:05
 
 
À
18/04/2013 14:10:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01571265
Message ID:
01571591
Vues:
163
>>If there is a potential of returning different values, this function should not be used.
>>I think VFP Help can be a bit more explicit here. I am using community supported VFP
>>help, so I suggest to update this topic with more information as why this function
>>should never be used for indexing without second parameter.
>
>There could be use. If you're not looking for a sorted order, per se, but rather just the ability to find a particular entry on a particular date, it would work. In that case it's just a key.
>
>>BTW, it doesn't make sense to use DTOC as is anyway, because the rows will not be properly sorted.
>
>Also, if you use the form:
>
>
SET DATE YMD
>SET CENTURY ON
>INDEX ON DTOC(dMyDate)...
>
>and it will create a properly sorted index. Each time you go to update though ... beware.
>
>This problem of Tommy's actually exposes a flaw in the xbase index design in that it doesn't convey that meta data about the environment from which it was created. I'll have to address that in Visual FreePro and remove this shortcoming.
>
>I'm still not understanding the cause of Tommy's error outside of a bonafide bug in VFP9SP1.

Rick,
I am afraid Naomi is 100% correct here, dont use dtoc() in your index, use dtos() which secures a correct index and dtoc() not, also read the help file about dtos().
Sorry, lacking of time to produce a sample to proof dtoc() in an index can result into undesirable effects.
Regards,
Koen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform