Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FIX: this bug fixing change the VFP behaviour a lot
Message
De
16/08/2005 12:04:14
 
 
À
16/08/2005 07:05:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01041266
Message ID:
01041359
Vues:
33
>On Thread #1041159 Peter post a hold VFP's issue.
>
>Run this on VFP9 return expected THERMO evaluation:
>
>* THERMO calls
>* parsing
>RECNO=1
>* load data
>RECNO=2
>RECNO=3
>RECNO=4
>RECNO=8
>
>
>before (VFP8,7..)
>
>* THERMO calls
>* parsing
>RECNO=8 && Bug
>RECNO=8 && bug
>RECNO=1
>* load data
>RECNO=2
>RECNO=3
>RECNO=4
>RECNO=5 && Bug
>RECNO=6 && Bug
>RECNO=7 && Bug
>RECNO=8
>
>
>The code:
>
>CLEAR
>SET ASSERTS 	OFF
>SET CPDIALOG	OFF
>SET DEVELOPMENT	OFF
>SET COMPATIBLE 	 	FOXPLUS
>SET HEADINGS		ON
>SET STATUS BAR		OFF
>SET NOTIFY		OFF
>SET NOTIFY			CURSOR OFF
>SET TEXTMERGE		NOSHOW
>
>SET OPTIMIZE		ON
>
>SET ENGINEBEHAVIOR 80
>
>WITH CREATEOBJECT("session")
>	SET DATASESSION TO (.datasessionid)	&& default set
>	
>	SET NULLDISPLAY TO "I'm null"
>	CREATE CURSOR myTest (A I NULL)
>	INSERT INTO myTest VALUES (5)
>	INSERT INTO myTest VALUES (0)
>	INSERT INTO myTest VALUES (0)
>	INSERT INTO myTest VALUES (null)
>	INSERT INTO myTest VALUES (2)	&& VFP don't visit THERMO here
>	INSERT INTO myTest VALUES (1)	&& VFP don't visit THERMO here
>	INSERT INTO myTest VALUES (7)	&& VFP don't visit THERMO here
>	INSERT INTO myTest VALUES (0)
>
>SELECT * FROM myTest;
>	WHERE (MOD(A,1000)#0 OR THERMO(A));
>	INTO CURSOR rrr
>
>ENDWITH
>
>PROCEDURE THERMO(vValue)
>	? "recno()=",RECNO(),"A=",vValue
>
>
>Of course in the documentation,
>nothing of this is brought (at least me I don't find it).
>
>VFPT:
>When the way of operating on the data changes,
>it Needs to bring it in the documentation.
>Is acceptable not to do only it when a bug removes some error produced.

hi Fabio,

I wonder ....

This is imo a completely different issue than evaluating an expression outside an SQL statement

I'm under the impression that the sql engine can rearrange the order of the expressions in the where clause as it sees fit

Personally, I would use a construct like
where  (  iif( empty(mod(A,1000)), TRUE, Thermo(A)) )
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform