Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
(Error 1815) cursor must be created with SELECT INTO TAB
Message
De
16/02/1999 07:23:06
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
15/02/1999 10:04:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00187655
Message ID:
00187963
Vues:
23
I wanted to not change the resulting cursor recently. Did so by adding DISTINCT to the SELECT statement. Never thought of using WHERE .t.. Thanks for the tip.


>>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.
>>
>
>An alternative in VFP 3 would be to add something simple to the WHERE clause that isn't Rushmore optimizable; I've found that adding AND .T. to the WHERE clause accomplished the same thing as adding the calculated field, without changing the structure of the resulting cursor.
>
>>>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,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform