Nick Causton wrote: Hi all, I have a problem with an app which retrieves from a table of over 100k records, this is happening via ASP with ADO so it can only be done using SQL. There is an OrderNo field which is indexed and to move through the records I am using: * Next SELECT TOP 1 * FROM Orders WHERE Orders.OrderNo > (clastOrderNumber) ORDER BY OrderNo DESC * Prev SELECT TOP 1 * FROM Orders WHERE Orders.OrderNo < (clastOrderNumber) ORDER BY OrderNo ASC Problem is VFP does not use the index for this and retrieving the next/previous record takes nearly a minute when it is running over the network. Any suggestions how to get around this?
Nick, You kinda confused me. You say its ASP and ADO and must be that way, but then you say VFP at the end. It's a SQL Server table residing on a database server or the internet somewhere? How does the ASP/ADO come into play if you're running from VFP? _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

