Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT & UPDATE without index columns
Message
From
14/01/1999 13:36:52
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00175810
Message ID:
00176096
Views:
34
Nigel

I knew it sounded too simple. Without the ability to create an index, you appear to be stuck. Just a thought, could you not set a filter to the file above the recno() value you are interested in?

>>When you say "scans a table", are you using a scan/endscan loop or doing a REPLACE ALL FOR ... (another way to scan the table for records that match the criteria) ?? If you are doing a REPLACE ALL, the ALL keyword will implicitly lock the table (loose the ALL, and no LOCK). To avoid this, set an index (or create a temporary one). SEEK for the first matching record and if found, do your REPLACE to the REST while the HAVING criteria remains True.
>>
>
>Gary,
>
>The existing program does SCAN..ENDSCAN but needs to be optimised. A number of problems - there is no index and it cannot be opened exclusive to create one, and SELECT * WHERE RECNO()>nnn does not work fast enough. It starts at the first record and will take too long. Existing program calculates start position, verifies data in start position and does SCAN REST. We are having problems with tables being locked and it seems to coincide with this procedure. The table is open shared but as soon as the first replace within the scan hits, others have problems adding records to end of table.
-=Gary
Previous
Reply
Map
View

Click here to load this message in the networking platform