Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET KEY and BINTOC()
Message
From
03/09/2006 04:06:26
 
 
To
02/09/2006 21:59:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01150560
Message ID:
01150584
Views:
23
This message has been marked as a message which has helped to the initial question of the thread.
>>
>>SET EXACT OFF
>>SET ORDER TO indicenovo
>>SET KEY TO BINTOC(lnValue)
>>
>>
>>>where lnValue is an Integer
>>>
>>>But if I create an index using PADL instead of BINTOC it works perfectly:
>>>PADL(int1,6,"0") + PADL(int2,6,"0")
>>>
>>
>>ARE YOU SURE ?
>>
>
>Yes Fabio,

PADL and BINTOC works in the same manner.

>I did'nt manage to make it work using BINTOC()
>Any ideas ?
>

it is simple, SET EXACT OFF is necessary
CREATE CURSOR blabla (f1 I,f2 I)
INSERT INTO blabla VALUES  (1,2)
INSERT INTO blabla VALUES  (2,3)
INSERT INTO blabla VALUES  (2,4)
INSERT INTO blabla VALUES  (10,4)

SET COLLATE TO "MACHINE"

INDEX ON BINTOC(F1)+BINTOC(F2) TAG TT

SET KEY TO BINTOC(2)

SET EXACT OFF
BROWSE TITLE "EXACT "+SET("Exact")

SET EXACT ON
BROWSE TITLE "EXACT "+SET("Exact")
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform