Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek does not seek
Message
From
02/10/2005 15:47:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
02/10/2005 15:41:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01055372
Message ID:
01055374
Views:
7
>I've a strange behavior with an index:
>
>
>The index is: ALLTRIM(CharField) + DTOC(DateField)
>
>When I "append from othertable" with the same structure, the seek function does not find the record, if I issue REINDEX command, Seek function works fine!
>
>Thank's in advance,
>Nuno Pedro

You should NEVER use an index with a varying keylength. Better index on: CharField + dtos(DateField), or, if you insist on using ALLTRIM(), on something like: padr(alltrim(CharField) + dtos(DateField), 30).

See also the help for dtos() - it is more appropriate, for indexing, than dtoc(). (Or use dtoc() with the second parameter - 'tis the same thing.)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform