External File Import Menu
The next step in the import process is to match or pair the field list from the external file to that of the CAPITAL database you have selected. If you are importing a dBASE III file, the field name information will be contained in this file and the field names will be displayed automatically in the From column for you. If you are reading in an ASCII text file, the fields will simply be named FIELD 1, FIELD 2, etc.
The Source column will show all or a portion of the data that has been read from the external text file. This is the data that will be transferred into CAPITAL when the import process is started.
CAPITAL may "conform" the data to meet its requirements.
For example, the amount fields in the external text file may contain commas and dollar sign symbols, i.e., $100,235.00. Since this information is not acceptable to CAPITAL, these extra characters will be removed automatically during the transfer process.
The Info column designates where the data will be placed from the external text file into CAPITAL. Highlight to select the field you are interested in and press Assign. Select from the drop down list the CAPITAL field to assign the chunk of data contained in the external file.
If you are importing a dBASE III file and the field name in that file has the same name as the field in the CAPITAL file, the import utility will automatically make the assignment for you. You can change or remove these assignments if they are incorrect.
If you assign the same CAPITAL field name more than once, CAPITAL will merge the data from both "chunks" of the external file into the one CAPITAL field. You do not have control over the ordering of the merged data, however.
Once you have made one or more assignments you may press Preview and see how the import will look by examining a CAPITAL screen containing the data you have selected.
Command Options
Import
Starts the import process.
Cancel
This cancels the import process before it begins. If you wish to go back and continue where you left off you should save your field assignments in a DIM file. See Fields below.
Assign
Allows you to assign data to a CAPITAL field.
Clear
Clears the assignment.
Next >
Views the next record from the external file.
Preview
The preview command allows you to examine how your data will look inside CAPITAL. It does not permanently transfer that data to CAPITAL. The field assignment list is used to determine which chunks of information from the external file will be moved into CAPITAL. You cannot select this option if you have not yet made field assignments or if you are importing a card file database.
Fields...
Open a field list
Select this option to load a Data IMport file (DIM) that contains field assignment information that you have previously saved. CAPITAL also comes supplied with several sample DIM files for importing data from other popular packages, found in the \CAPITAL\DIM sub-directory.
Save a field list
If you have created a series of field assignments and wish to use this information at a later date, select this option to save the information into a Data IMport (DIM) file.
Scripts
Import scripts allow you to perform special data manipulation operations when importing data. This might involve combining data from multiple fields, or truncating or padding fields with special information. Import scripts are intended for advanced users, consultants and computer programmers.
To attach a script to a import field, select the field row you wish to work on and click on Assign... to create the script.
A text editor will appear that will allow you to enter your script. To test the script before importing, select the Preview command.
Be sure to save the script if you intend to use it again. This can be done by clicking on scripts and selecting Save import scripts.
See Script Programming for more information.
Hints & Tips
If you want to save your import script (DIM file) then be sure to do so before you press the import button. You won't get the opportunity to do so once importing has started.
At the end of the import process the system reports on the number of records that failed import, if any. Records cannot be imported if the data file is missing critical information. For stock files this is the product code. All customer and supplier accounts to be imported must be assigned account codes in the original source data.
Unfortunately,
many programs that export dBASE III data files do not do so correctly and may in fact create corrupt files
that CAPITAL will be unable to load. Microsoft Excel appears to sometimes have this problem in all versions.
If you are working with Microsoft Excel check the following:
That no field heading (name) is repeated.
That no field heading contains illegal characters. The only legal characters are the capital letters A-Z, underscore (_) and 1-9.
A valid dBASE field must start with a letter.
That field names are not longer than 10 characters.
If you still cannot import the data file because CAPITAL reports that the file is corrupt, your only alternative is to save the file as ASCII delimited.
____________________________
Related Topics:
![]() |