Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Applies Filter
Message
From
24/11/2004 12:32:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
VFP Applies Filter
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00964382
Message ID:
00964382
Views:
36
I have noticed a strange behaviour while using SELECT command. I have a table called SPHIST, which has about 200,000 records. I use a command like this

SELECT * from SPHIST where VIN = "1234" INTO CURSOR ABC

The query should select one record (as there is only one record in SPHIST for the matching VIN). It does create a cursor ABC with one record. I see one record when I browse the table. However, FoxPro links the ABC cursor to SPHIST and applies a filter (VIN = "1234"). The status bar shows

ABC (database!SPHIST) Record: 161518/214052

In most cases, it does not affect the speed. However, if I use a commands like this:

USE SomeTable
APPEND FROM DBF('ABC')

It starts appending the entire SPHist table instead of a single record.

This behaviour (of applying a Filter instead of creating a new cursor) does not happen always.

Has anyone faced something similar? Any workaround?

Thanks.

- Ravi
- Ravi Taxali
Visual FoxPro Made Simple An excellent book for beginners as well as experienced programmers
Never Forget Again. Setup Email Reminders.
Next
Reply
Map
View

Click here to load this message in the networking platform