Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Issuing sql stmt creates used again filtered table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01018982
Message ID:
01018989
Vues:
12
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform