>
>I too used to initialize the array prior to the SELECT, but I found I could streamline the code a bit by testing _TALLY, and if it was zero, I knew the array wouldn't be created. But now in VFP9, the array will always be created. I must say, having a bunch of controls saying ".NULL." will get your attention. :-)
Hi John,
An array will only be created when query returns non-zero # records. The ANSI SQL standard requires that query with aggregate function return a record with Nulls for empty result set. VFP9 is now compliant with the standard in this part.
CREATE CURSOR testxx (ii int, cc char)
SELECT * FROM testxx INTO CURSOR crsTest
? _TALLY
SELECT SUM(ii) AS sum1 FROM testxx INTO CURSOR crsTest
? _TALLY, sum1
SELECT MAX(ii) max1 FROM testxx INTO CURSOR crsTest
? _TALLY
--sb--