Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is SELECT SQL the same as SET FILTER TO in some cases?
Message
From
15/12/1998 07:48:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Is SELECT SQL the same as SET FILTER TO in some cases?
Miscellaneous
Thread ID:
00167589
Message ID:
00167589
Views:
71
Hello,

I am using Visual FoxPro 6.0. I want to use cursors to show results of different tables in a grid. To create cursors I am using the SELECT SQL command. In some cases I could have used the SET FILTER TO instead, but I have heard that SELECT SQL is faster. Now something strange has happend and it is the following.

I have used the following command to store some data from one table into a cursor to put in a grid:

SELECT * ;
FROM Pending ;
WHERE Pending.BonNr = THISFORM.BonNr.VALUE ;
INTO CURSOR Result

After that I select the cursor with SELECT Result. Then when I browse the cursor everything seems to be normal, but when I then use SET FILTER TO, then all of the
data stored in the Pending-table will be showed in the cursor. In other words: FoxPro is copying the Pending table to the cursor Result and sets a filter to the BonNr. Even RECCOUNT() is showing the same number of records in Result as in Pending after the SELECT-command.

I solved the problem by using the NOFILTER option in the SQL statement. The question however is: Is the SELECT SQL-command the same as the SET FILTER TO-command in this case?

Greetings,

Afier Appelman
Greetings,

Afier Appelman
Next
Reply
Map
View

Click here to load this message in the networking platform