Mathew,
Yes, pulling a SELECT into a cursor gives a read-only result. In order to change the result you need to do a SELECT...INTO TABLE MyTable.
As for indexing, I have never seen it documented, but have always been able to create exactly one index on a cursor pulled from a SQL Select. Attempting two indexes gives an error. I have formed my programming habits around this.
If you want to do SELECT...INTO TABLE, then you can index and otherwise modify the resulting table as much as you want, but you buy some maintenance chores -- you have to make sure you don't clutter the disk with lots of these temporary tables.
>Hi Guys,
>
>If I use the following code and I end up with 'YTDDET.dbf' is a read-only. I also notice that it will work once, the second time I got this message.
>
>SELECT * FROM YTDDET WHERE BETW( ACCBRN, "1000","9999");
>AND !INLIST( ACCBRN,"9612") INTO CURSOR TEMP
>
>INDEX ON BDATE TAG BDATE
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement