Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No clue for the error
Message
 
 
To
30/09/2005 23:21:12
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01053566
Message ID:
01055281
Views:
11
>thanks, I better change my code.
>
>I also have another code:
>SELECT * FROM MyTable ;
>	INTO CURSOR abcdzzz
>select abcdzzz
>just wonder if it's a right code.

Hi Jerry,

Why syntactically it's correct code, there're couple things to note.
First, you don't need to select a cursor after SELECT INTO CURSOR because it'll be the currently selected alias anyway. But it doesn't hurt do to that either.
Second, a query may create so called "filtered cursor". A filtered cursor is a query source table opened similar to USE AGAIN and SET FILTER applied to it. With many records returned, SET FILTER will be faster becuse records don't have to be written to the result cursor. It can be created under following conditions:
- Only one table is referenced by query
- WHERE condition is fully optimisable and can be represented by SET FILTER TO
- Either all fileds from the table are selected or subset of fields can be limited by SET FIELDS command

Such cursor cannot be used in subsequent queries and there some other sideeffects also, like RECNO().

Your query satisfies requirement for the filtered cursor. If you want query to create "real" cursor, add NOFILTER clause. If resulting cursor has to be updatable, add READWRITE clause.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform