General information
Category:
Coding, syntax & commands
In some cases, yes. Depending on some conditions, VFP will use the table again and put a filter on it. You have to include the NOFILTER keyword in the SELECT-SQL if you want to force VFP to create a real cursor.
>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?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only