DataExport/DLL Implementation Options
DataExport/DLL provides two different methods to output data formats:
Cell-by-Cell output, which uses only the DLL API to create a file,
and File-Based Translation, which uses intermediate disk files
to create an output file. This page provides a more detailed descriptionz
of the options for implementing DataExport/DLL in your application.
Implementation Overview
The diagram above illustrates the data translation process of
DataExport/DLL and two possible implementations. A) The Cell-by-Cell
(or field-by-field) output method, which uses the DataExport/DLL
Application Programming Interface (API) to initialize an output
file, pass data to the file and close it. B) The File-Based Translation
method, which uses an Export Definition File (EDF) to define the
final output format, a Raw Data File as a data source and a single
API call to the DataExport/DLL to perform the translation.
Diagram of DataExport/DLL data translation and output process.
Cell-by-Cell Output Method
The Cell-by-Cell output method uses the DataExport/DLL API to
establish a file output format and then communicate each unit
of data to the DataExport/DLL. This process is called Cell-by
Cell output because it requires calling the DLL once for each
cell-or field in a database-that is output.
In a Cell-by-Cell implementation, the calling application begins
translation using DXInitTrans. The data format of each column
(or field) is then specified with DXDefData. The calling application
then begins writing data for a row (or record) to a buffer with
the DXPut commands, completing each row with the DXWriteBuffer
command.
The process of passing data with the DXPut commands and writing
the buffer continues until all rows, or records, have been written.
The calling application then completes the output file with the
DXCloseFile command.
File-Based Translation Method
The File-Based Translation method uses an Export Definition File
(EDF) to define an output format, a Raw Data File to communicate
the data and a single API call to initialize translation. This
method of output uses the DataExport/DLL as a kind of batch processor.
In a File-Based Translation implementation, the calling application
creates an EDF containing information about the type of output
file that is desired, the column definitions (or field definitions)
and names of the files. The application also writes a Raw Data
File in a simple ASCII format to be processed by DataExport/DLL.
Finally, the calling application issues a DXLaunchEngine call
to begin translation.
File-Based Translation Method Using a DataImport Mask
The File-Based Translation method may also be used with a DataImport
for Windows Mask file (MSK) substituted for the EDF and, optionally,
a report file or other text file may be substituted for the Raw
Data File. Developers wanting to use this method should develop
their Mask using DataImport and then follow the instructions for
the File-Based method, substituting an MSK for the EDF and, optionally,
a text file for the Raw Data File.

© 2010 Spalding Software, Inc.
- For more information, email: info@spaldingsoftware.com