Microsoft KB Archive/101295: Difference between revisions
(importing KB archive) |
m (Text replacement - "<" to "<") |
||
Line 16: | Line 16: | ||
To copy all database records into the array, you must dimension the array as follows: | To copy all database records into the array, you must dimension the array as follows: | ||
<pre> DIMENSION myarray( | <pre> DIMENSION myarray(<# of records>,<# of fields>) | ||
</pre> | </pre> | ||
Another workaround is to not DIMENSION the array before issuing the COPY TO ARRAY command. If the array does not exist, it will be created in the same format as if DIMENSION MYARRAY(n,1) were issued. | Another workaround is to not DIMENSION the array before issuing the COPY TO ARRAY command. If the array does not exist, it will be created in the same format as if DIMENSION MYARRAY(n,1) were issued. |
Revision as of 10:02, 20 July 2020
FoxPro COPY TO ARRAY Behavior with One-Dimensional ArraysID: Q101295 The information in this article applies to:
When you use the COPY TO ARRAY command to move all records in a database to an array, only the first record will be copied into the array depending on how the array has been dimensioned. When the array has been created using DIMENSION MYARRAY(n), a one- dimensional array of n elements will be created. However, when you attempt to use the COPY TO ARRAY MYARRAY command, only the first record will appear in the array. To copy all database records into the array, you must dimension the array as follows: DIMENSION myarray(<# of records>,<# of fields>) Another workaround is to not DIMENSION the array before issuing the COPY TO ARRAY command. If the array does not exist, it will be created in the same format as if DIMENSION MYARRAY(n,1) were issued. Additional reference words: FoxDos FoxWin 2.50 2.50a DIMENSION COPY TO ARRAY KBCategory: kbprg KBSubcategory: FxprgGeneral |
Last Reviewed: June 27, 1995 |