It's a bug in VFP8. See
Array elements beyond 32,768 NOT accessible when array is a property of an object. Bug #7.
>I have a combobox class with an aRowSource[1,0] array property that is populated with a SQL Select and used as the RowSource for the dropdown.
>
>My problem is a "larger-than-preferred" dropdown consisting 2 fields from a 22,702 record table. This calculates to 45,404 elements which is under the 65,000 Maximum # of elements.
>
>The aRowSource is created and dimensioned properly - aRowSource[22702,2] but I get the "Array Dimensions are Invalid" error when populating aRowSource[16385,1] element. Thinking it was a problem with my data I tried to populate the element from the Debugger and received the same message. I then did some command line testing as follows:
>
>
>USE employee
>
>* populates the laArray with all 22702 records
>SELECT Employeeno,fName FROM employee INTO ARRAY laArray
>
>* Error occurs populating aRow[16385,1] element - Array Dimensions are invalid
>loComboBox = NEWOBJECT("ComboBox")
>AddProperty(loComboBox,"aRow[1,1]")
>SELECT Employeeno,fName FROM employee INTO ARRAY loComboBox.aRow
>
>* Error occurs populating aRow[16385,1] element - Array Dimensions are invalid
>loForm = NEWOBJECT("form")
>AddProperty(loForm,"aRow[1,1]")
>SELECT Employeeno,fName FROM employee INTO ARRAY loForm.aRow
>
>
>It appears the max elements is 32,770 when the array is a property on an object. Is this a known problem with VFP 8.0?
>
>The code works fine in VFP 6.0 and 7.0...
--sb--