PRB: APPEND FROM ARRAY Creates Only One Record (119635)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft FoxPro for Windows 2.6
  • Microsoft FoxPro for Windows 2.6a
  • Microsoft FoxPro for MS-DOS 2.0
  • Microsoft FoxPro for MS-DOS 2.6
  • Microsoft FoxPro for MS-DOS 2.6a
  • Microsoft FoxPro for Macintosh 2.6a
  • Microsoft FoxPro for UNIX 2.6

This article was previously published under Q119635

SYMPTOMS

The APPEND FROM ARRAY command should create one record in the currently selected database for each row in an array. Occasionally, only a single record will be created with the data from the first element of the array.

CAUSE

The array has been created as a one-dimensional array, as shown in the following example:
   DIMENSION myarray(40)
				

RESOLUTION

The array must be created as a two-dimensional array, as shown in the following example:
   DIMENSION myarray(40,1)
				
The ",1" causes the array to be created as 40 rows by 1 column. The APPEND FROM ARRAY command will now function as expected.

Modification Type:MajorLast Reviewed:5/6/2003
Keywords:KB119635