The utility can...

  • Data can be imported into VDF native or compatible data files by one of three ways with this utility. In addition, code may be generated that will perform the same functions.
  • Both the utility and the code that's generated use BPOs and a generic data dictionary to perform the import.
  • The data file may be zeroed prior to the import.
  • An entire record - all fields - may be read, or individual data fields may be selected, in any order.
  • Header records in delimited and fixed field formats can be included, but will be ignored.
  • Text and binary fields may be imported in HEX or ASCII.
  • Generated code is IDE compatible and can be added to Abdata by the wizard.
  • Recnum is never imported, all records should start with a field greater than 0


The utility can not......

  • Line delimited formats are not read.
  • Fixed Field Length formats and XML generated by dbExport can not be imported
  • XML will not currently read attributes
  • Recnum is assumed to never be in the import file, all records should start with a field # greater than 0
  • Only one file at a time can be imported, related files are not considered


File Format Notes

1. Delimited

Data may be separated by comma, semicolon, tilde, asterisk or almost any other single character. Tab delimiting is not supported.

Double quotes around strings are ignored

2. XML

The general XML format is as follows

<FILENAME>

<Row>

<CATEGORY>Batch Claims</CATEGORY>

<SUB_POSITION>3</SUB_POSITION>

<ACTIVATION>Activate_servedi_rpt</ACTIVATION>

</Row>

<Row>

<CATEGORY>Batch Claims</CATEGORY>

<SUB_POSITION>3</SUB_POSITION>

<ACTIVATION>Activate_ContractEDI_rpt</ACTIVATION>

</Row>

etc.

Cdata sections may also be read without any changes, if used.

3. Fixed Field Length

The file format is NOT the same as the one exported by dbExplor, so do not try and read a file generated by dbExplor.

It is expected that each new data field will start at the end of the previous. For example,

Length Start Position

Field1 6 1

Field2 8 7

Field3 2 15

Field4 1 17

etc.


Workspace Selection

Fire up the wizard. The first page is simply some criteria or rules that that wizard operates under. Click Next...

Select the workspace you want to import files from.

If you eventually choose to generate code rather than import directly through the wizard, the source directory of this workspace is where the code will be written.

Click Next...


File or Table Selection

Select the table you want to import the flat file into - Only one checkbox can be selected at a time.

Click Next...


Field or Column Selection

There are two major choices on this page.

  • Check the "Are the data fields..." checkbox at the top to select all fields other than Recnum or the RecID, in the "normal" order they are in the file.
  • Uncheck the checkbox to make the two lists available so that you can pick the fields you want.

If selecting individual fields, select in any order, and only the ones you need - these should match the flat file being imported. Click "Start Over" to initialize the screen and clear all selections.

If you have columns in the flat file being imported that you do not want to import, check the corresponding "Ignore Text" checkbox on the right. This choice will be written to the output code should you make that selection.

Click Next...


Miscellaneous

First, select the file type to be imported.

Zero file before importing - A Zerofile will be performed on the file you are importing into. All users will need to be out of that file.

Is there a header Row? - Excel and other products will export a file with the first row being column headers or names. Checking this will cause the first row to be ignored.

Import Text & Binary from Hex? - If the text and/or binary fields in the import file are in Hex, they will be converted.

Data Delimiter - Select or enter another delimiter. Choices are Comma, Tilde, Semicolon or Asterisk. "Other" is any visible ASCII character, TAB is not valid.

Import File Name - A file name must be entered or selected whether you are importing with the wizard or generating code.

Click Next...


Import or Generate Code

Select what you want to do.

If generating code, you have the option to add your application to the IDE files in the workspace you initially selected. This is useful if you want to edit the view for some reason. The generated code is IDE compatible.

Click Next...


Finally...

The last screen is a summary of your choices. Click next to either import your file or generate code.


dbImport

dbImport is a data import wizard style utility. It will import flat or text files into DataFlex or DataFlex compatible files.

dbImport was written to be a companion utility to dbExport, a utility that comes with Visual DataFlex. It will import most of the output formats of dbExport, but will not import line delimited files.

Another feature of dbImport is that it will either import data itself or write an IDE compatible program that can be modified as necessary.

If you look at the code, either for the wizard itself or generated code, it will be seen that all is backward compatible for earlier versions of VDF and earlier studio versions.