Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a fast way to go to an absolute index position...
Message
From
20/06/2004 13:25:11
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
20/06/2004 11:20:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00915480
Message ID:
00915492
Views:
13
Hi John

I would like to know why you have to use index position rather than a seekable key.

>
>The only problem with the above code is when you initially go into the window for the first time. I set ThisForm.CurrRecord to the total number of records in the table. It skips the entire number of records in the table. If there are over 200,000 records in the table, it takes about 15 seconds. After that, there is no slow down whatsoever. It is only upon the initial load. I played with looking at the total number of records and determining whether to do a negative skip from then end or a positive from the beginning (whichever is closer), but it didn't help that much.

In the initial loading of the form, could you avoid the GO TOP, SKIP 200,000 and use GO BOTTOM instead?

GO BOTTOM should take you to the 200,000th record in the current index order.

For that matter you could also
SET ORDER TO (current tag) DESCENDING
LOCATE
SET ORDER TO (current tag) ASCENDING
To get to the last record faster.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform