Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can SEEK() return .T. but have the wrong record?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00903416
Message ID:
00903463
Views:
20
>Gerald,
>
>It doesn't make any difference if you pad with X's or you let str() use spaces. Your index expression would be a bit slower because of the extra function calls involved.
>
>>STR() return a lot of spaces, try to index with something like:
>>
>>PADL(ALLTRIM(STR(ParentID)),10,"X")+PADL(ALLTRIM(STR(ChildOrder)),10,"X")
>>
I know that this will not make any difference for the index itself.
As you said, this may be slower to create the index (millisecond? seconds?).

But, the string used in the seek will be easier to construct and can be used directly as a treeview key (and this is the case here I think).

I think the previous paragraph is enough to justify the use of the padded string IMHO.

:-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform