>>>
>>>This sounds great. However, I run your program (added some code to resolve file is in use error, no where in sql at all) , edited the cursor using browse command but base table was not changed!!
>>>It seems that I edited only temporary table. How it is possible
>>>to change cursors base table in this way !? How I can make true cursor?
>
>>Yes you only edited the temp cursor. There is no base table. In buffering you just issue tableupdate() but here it's a separate cursor. You should do the update with code. It's cumbersome at first but for large tables and set filter needs, this one execute faster. To make it easier also set buffering on with that cursor so you could loop through modified&added recs.
>
>Cetin, the command
>
>select * from LargeDBFFileOnLAN where .t. into cursor tcTemp
>
>works very slow. It scans whole base table! I have 98 MB dbf file on 10 MB
>lan and this runs almost forever!
>SQL SELECT works fast only without where clause.
>
>So it is not possible to use select into cursor for fast data selection in
>cases where select returns many rows! What to do?
Hi Andrus,
J. (Juan ?) as more people contribute to thread we can find a solution faster. Squeezing in a thread is a need (I would call it contributing).
As Juan (if I remember well J.Crescencio name) mentioned, I thought you were using "set filter to someexpression" originally. If it's the case why select whole table now ?
select * from mytable ;
where filterexpression and .t. ;
into cursor mycursor
would select only the subset you need. "where .t." addition would force a true cursor creation. If your expression generally select a very large quantity then you may want to prefer "set filter". Another approach then could be a use again and set relation. ie: Expression has a fully qualified index(es)
use tableA in 0 again alias tableB order tag f1
use tableA in 0 again alias tableC order tag f2
use tableA in 0 again alias tableD order tag f3
select tableC
set relation to f3 into tableD
select tableB
set relation to f2 into tableC
select tableA
set relation to f1 into tableB
Cetin