Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT-SQL INTO ARRAY returns a NULL value
Message
From
10/06/2004 14:13:34
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
SELECT-SQL INTO ARRAY returns a NULL value
Miscellaneous
Thread ID:
00912356
Message ID:
00912356
Views:
62
I have an application class method. Here is the code.

LPARAMETERS tcCategoryCursor

SELECT SUM( itemcost ) AS TOTALCOST ;
FROM ( tcCategoryCursor ) ;
INTO ARRAY laCategoryCost

RETURN IIF( _TALLY > 0, laCategoryCost[ 1 ], 0 )

The value returned from thsi method is assigned to a value property of a textbox.

In the case where tcCategoryCursor does not have any rows, I would expect _TALLY to be 0 and the method return 0 (i.e. the behavior I see in VFP 6 and VFP 8).

However, in VFP9, _TALLY is set to 1 and a single-element array is created with a value of .NULL.

Is this the intended behavior in VFP9? The documentation does state that the array is created if is doesn't exist or is re-dimensioned as needed, but doesn't mention setting its value to .NULL. if the underlying cursor/table does not have any rows.

Thank you,

John
Next
Reply
Map
View

Click here to load this message in the networking platform