Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp bug: rushmore fails with set filter and grid
Message
From
07/05/1998 01:50:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/05/1998 14:23:09
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00096421
Message ID:
00097584
Views:
47
>>>
>>>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)
* f1, f2, f3 fields are indexed as f1,f2,f3
* set filter to f1+f2+f3 = somevalue desired 
*(or f1=something and f2=something which would be f1+f2=something+something)
* and you don't want to create f1+f2+f3 compound index
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
* Now you have subsets in tableB, tableC and tableD
* You could use the appropriate one in grid
* This is quirky but a fast way where case fits
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform