Yes, it is by design.
>Hello all,
>
>The following query produces not a cursor as expected but what appears to be the basetable use(d) again and filtered:
>
>
> SELECT Historicalreservations.* FROM Historicalreservations ;
> WHERE Historicalreservations.darrive > DATE() ;
> AND Historicalreservations.iguestid > 0 ;
> AND INLIST(Historicalreservations.rms_status,"C","A","U") ;
> AND Historicalreservations.iruid = xi_RUID ;
> ORDER BY Historicalreservations.darrive ;
> INTO CURSOR x_NextResv
>
>
>issuing MESSAGEBOX(SET("Filter")) in the command window produces the following:
>
>---------------------------
>Microsoft Visual FoxPro
>---------------------------
>DARRIVE>DATE().AND.IGUESTID>0.AND.INLIST(RMS_STATUS,"C","A","U").AND.IRUID=XI_RUID
>---------------------------
>OK
>---------------------------
>
>
>this was not happening until I added an index for deleted() to this table. Is vfp arbitrarily deciding that it is faster to open the table again and filter it than it is to issue select sql statement and create the expected cursor ?
>
>BTW issuing readwrite forces the cursor to be created correctly