Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mixed ascending and descending in same tag..?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00500818
Message ID:
00502176
Views:
25
Jon,

I've just created test case and tried it. All works just fine.
Here is the test case:
create cursor test (BankCode C(4), ValueDate D)
for i=10 to 5000
  insert into test values (str(i,4), date()-(i*mod(i,2)))
  insert into test values (str(i,4), date()-4)
next   
index on BankCode+bintoc(date(2001,12,31)-ValueDate)) tag test
seek seek str(27,4)+bintoc(date(2001,12,31)-date()+4)
>>Looks like I and Larry were too quick in our first suggestion. Sergey is right.
>>
>>So, use the fixed date and Bintoc function, e.g.
>>BankCode+bintoc(date(2001,12,31)-ValueDate))
>
>Nadya,
>
>Well, we're unfortunately not out of the woods yet. :(
>
>When we implement the BINTOC in the tag, we're encountering some strange behaviour. If we browse the table in the IDE with that tag order set, the record order is exactly what we expect. However, if we try to seek a record using the same syntax as the key expression it will always fail.
>
>Is there something about creating an expression with BINTOC that's causing a problem when trying to look up the record?
>
>Laterness,
>Jon
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform