>I have a problem with Windows 2000 (profesional/advanced server) using the command COPY TO ARRAY (VFP 5.0a/VFP 6 no service pack 3). Presuming I have a table with 2 columns (id,name) and 6 rows usin COPY TO ARRAY myArray create a bi-dimesional array with 2 colums and 6 rows. After that I used COPY TO ARRAY myARRAY FOR recno()=4 the array myARRAY remain like a bi-dimensional array with 2 columns and 6 rows NO 1 and 1. The firs element was sostitute with the 4thh elemnt from table (like SCOPE FOR). The same thing if I make an append in tha table and then I used COPY TO ARRAY myArray. The array remain 6,2 NO 7,2.
>If used RELASE ALL LIKE myARRAY works well.
>Works well even SELECT-SQL INTO ARRAY.
>Is this a problem with Windows 2000 or is something else ?
Nope - COPY TO ARRAY doesn't extend arrays with new data, it'll overwrite existing data in the array at most. To extend an array with new data, redimension the old array to the necessary size, do a COPY TO ARRAY to a different intermediate array, and then use ACOPY to add the new elements to the existing, redimensioned array.
>Can anybody help me ?
>Thank You !