Salesforce

How Do I Load Data to a Database Table from a Text File? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Load Data to a Database Table from a Text File? (Magic xpa 4.x)

It is often useful to import data from a text file. This is useful when you are importing data from a spreadsheet, or from a file that you have previously exported (How Do I Dump Data from a Database Table to a Text File?). Magic xpa provides a utility to do this automatically, the Generate Program utility (Options->Generate Program, or Ctrl+G).

Creating a text import program

  1. In the Data repository, position the cursor on the table you want to view.

  2. Press Ctrl+G (Options->Generate Program).

  3. Select:

    • Mode=Execute to view the data directly with a temporary, or Mode=Generate to create a new program in the Program repository.

    • Option=Import

    • Zoom from the Columns field to select only certain columns, if you want, and to change their order, if you want.

  4. For Text file, enter the name of the text file you will import.

  5. Press Enter or click OK.

If you selected Mode=Execute, the data will be imported from the text file you specified.

If you selected Mode=Generate, then there will be a new program in the Program repository. You can run this program by pressing F7.

Note: A plain text export can be very useful, but has some limitations. The particular problem happens to be memo fields which may contain a CR/LF, or BLOB fields. These sorts of files may require something more involved, such as XML input.

Reference
Attachment 
Attachment