Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Issuing sql stmt creates used again filtered table
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018982
Message ID:
01018989
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform