>>>Hi everybody,
>>>
>>>I have the following code
>>>
>>>
>>> this.mysqlexec(m.lcSQL,'csrTables', program())
>>> this.addproperty('aTables[1]')
>>> dimension this.aTables[reccount('csrTables')]
>>> copy to array this.aTables fields table_name
>>> use in select('csrTables')
>>>
>>>I found that only the first row value is properly copied and the rest of the values remain false. Do you see a bug in this code? The csrTables has 13 rows and only the first row value is copied into that array.
>>>
>>>Thanks in advance.
>>
>>That's because your array has only one row
>
>Actually, it was because her array had only one _column_. COPY TO ARRAY pays attention to whether the array is 1-d or 2-d.
>
>Tamar
>
>>
OK, let me rephrase
If you have a 1-d array, it behaves like an array with one row
The following give the same result
dimension this.aTables[reccount('csrTables')]
and
dimension this.aTables[1, reccount('csrTables')]
>>Try
>>
>> dimension this.aTables[reccount('csrTables'), 1]
>>copy to array this.aTables fields table_name
>>
Gregory