Partager via


Data Transfer from an Array to a Table

The following Visual FoxPro commands transfer data from an array to a table:

  • GATHER transfers data from an array to a single table record.
  • APPEND FROM ARRAY adds new records to a table and fills the records with data from an array.
  • INSERT - SQL appends a single new record to a table and fills the record with data from an array.

GATHER, APPEND FROM ARRAY, and INSERT - SQL differ in the following respects:

  • GATHER transfers data from an array to the current record in the current table. Additionally, the GATHER MEMVAR option transfers data from a set of variables to the current table record.

  • APPEND FROM ARRAY appends new records to the end of the current table and then transfers data from the array to the newly appended records.

  • INSERT - SQL appends a new record and then transfers data from the array to the newly appended record. Unlike GATHER and APPEND FROM ARRAY, INSERT - SQL can append a record in an unselected table (a table open in a work area other than the current work area).

    Note   APPEND FROM ARRAY or INSERT - SQL performs faster than APPEND BLANK followed by REPLACE, especially on a network.

See Also

APPEND FROM ARRAY Command | GATHER Command | INSERT - SQL Command | Data Transfer from a Table to an Array | Data Transfer and Arrays | Data Manipulation | Arrays and SELECT - SQL