Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FIX: this bug fixing change the VFP behaviour a lot
Message
From
16/08/2005 09:37:49
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01041266
Message ID:
01041314
Views:
20
Well I don't see anything in the Help for "SELECT - SQL command", under the "User-defined functions with SELECT" that mentions that UDFs are actually "executed" 'OUTSIDE' of actual SELECT processing to ascertain return type/length.

So I'd say there is something to document.

It's omissions like this that makes newbies find VFP 'difficult'.


>Fabio,
>
>There's nothing to document. UDF in a query cannot make any assumption about what the current work area is or what current record pointer is. It's your problem if you use UDF this way not VFP.
>
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform