Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINTOC() ¿Works in index?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00115812
Message ID:
00116014
Views:
28
>>I've read in VFP documentation that bintoc function may be used to reduce size of indexes. I've tested without success: bintoc(1) returns the same string than bintoc(2), 3, 4 etc. So how can be used to order records?
>>What i'm forgeting?
>>Thanks
>Nope. When you say the same string, how are you examining it? By simply: ? BINTOC(1), ? BINTOC(2). Try ? BINTOC(1) = BINTOC(2).

George,

? bintoc(1) = bintoc(2) returns me .T.
? bintoc(1) == bintoc(2) returns me .F.

i have 'set exact' to on

but, what i'm looking for is the possibility of using this on index tag:
I've tested this code:

create cursor prueba (numero i)

insert into prueba values (4)
insert into prueba values (3)
insert into prueba values (6)
insert into prueba values (5)

index on bintoc(numero) tag orden
set order to orden
browse

the records appears in the order of introducing.

I've tried too this:

? seek(bintoc(1), "prueba", "orden") returns .t.
? seek(bintoc(6), "prueba", "orden") returns .t.
but record pointer always remains in 1.

Which is my error?
Thanks
Saludos,
A.G.P.
---------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform