Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET KEY and BINTOC()
Message
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:
01150581
Views:
23
This message has been marked as the solution to the initial question of the thread.
Hi Cesar,

For using indexes with BINTOC() exist the one rules:
- Index must has collate MACHINE


MartinJ

>Is there a trick to use SET KEY command when the index expression contains BINTOC() ?
>
>I've created an index based on 2 integer fields:
>BINTOC(INT1) + BINTOC(INT2)
>
>I want to use the SET KEY to see only some fields that match the 1st value
>
>I'm trying this way with no success:
>
>
SET EXACT ON
>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")
>
>What am I doing wrong ? I'd prefer to use BINTOC() because this way I can reduce the index file size...
>
>TIA
>
>Cesar
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform