Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
(Error 1815) cursor must be created with SELECT INTO TAB
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00187655
Message ID:
00187658
Views:
20
James,

When you do a simple query (no joins, no calculated fields) VFP sometimes just does a USE AGAIN on the table you select from and sets a filter on it. In this case you cannot do a SELECT from the resulting cursor because SELECT ignores any filter.

If you're using VFP 5 or higher, use the NOFILTER keyword like this:
SELECT * ;
  FROM mytable ;
  WHERE ... ;
  INTO CURSOR mycursor NOFILTER
If you're using VFP 3.0 or earlier, just create a dummy calculated field:
SELECT *, ' ' AS Dummy ;
  FROM mytable ;
  WHERE ... ;
  INTO CURSOR mycursor
Either method will force VFP to create a new temporary dbf to hold the cursor instead of just filtering the original table.

>Anyone know what this means: (Error 1815) cursor must be created with SELECT INTO TABLE?
>
>I am attempting to select from a cursor into a second cursor as the datasource for a report.
>
>Until today it worked. Now I get this strange error message.
>
>Evidently Select is not finding the source cursor -- even though it is the table returned by ALIAS() at the point where the second select commences.
>
>Any ideas would be appreciated.
>
>Regards,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform