Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Descending Indexes
Message
De
17/04/1999 08:37:51
 
 
À
17/04/1999 08:30:11
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00209331
Message ID:
00209333
Vues:
15
>In Foxpro Dos if an index is descending then the entire index is flipped upside down so that if the native order is
>ACCT TRANS#
>1 1
>2 5
>2 8
>3 10
>4 12
>
>a index on acct in descending order would result in EXAMPLE A
>4 12
>3 10
>2 8
>2 5
>1 1
>
>However in VFP the descending order is EXAMPLE B
>4 12
>3 10
>2 5
>2 8
>1 1
>If in VFP the descending index is opened ASCENDING it results in Exaple A's order.
>
>This is strange to me. Is this intentional or it is a bug in VFP?

It's not a bug; if the second field is not a part of the index expression, VFP doesn't consider it as a part of the index sequence, so the order can be completely random. If you need a key to order on both fields, then create an index that includes both fields in the index expression. All that happened with FPDOS is that you got lucky with the order that records were encountered or added to the file when creating or maintaining the tag; insert the records in a different order into the table, order have the records occur in a different physical order in the table, and the results you got wouldn't be reliably duplicated.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform