Replace From Array
This command is another FoxPro 2.6 addition. It's similar to GATHER, but lets you store array data in more than one table at a time. It also completes the set of commands that contains COPY TO ARRAY and APPEND FROM ARRAY, letting you copy data into an array, then store it back into the same records.Beware—this is a powerful and dangerous command. It has the potential for great destruction if used carelessly. It can overwrite mounds of data in one line. Our general feeling is that you probably shouldn't be introducing this command into new development—generally we recommend using views for updating data. We've included it in the documentation here to help you understand 2.x code you may be called upon to update.
Usage |
REPLACE FROM ARRAY ArrayName [ FIELDS FieldList ] [ Scope ] [ FOR lForExpression ] [ WHILE lWhileExpression ] [ NOOPTIMIZE ] |
Example |
USE Customer * Position on the record you want COPY TO ARRAY aCust * Now edit the array contents as desired * When you're ready to update the record REPLACE FROM ARRAY aCust |
See Also |