Connectivity
How can I move data between
4D and other databases?
There are four useful ways to move data between 4D and other databases:
- From user mode, choose Import Data or Export Data from the File menu.
This will lead you into a dialog which allows you to move data to or from
an external delimited text, SYLK or DIF file. Read the section on this
feature in the User Reference to learn more.
- Use the Import Text, Import SYLK or Import DIF commands from the 4D
Language, or their Export equivalents. These very flexible commands work
with a 4D layout to allow you to execute code during the import or export
of each record. You should be able to import any external file in the
three supported formats this way, no matter how much the data needs to
be massaged during the import or export. Note that the built-in 4D variables
FldDelimit and RecDelimit can be set to whatever character you wish for
field and record delimiters during text export or import.
- Use the 4D SQL connectivity plug-ins (4D SQL Server, 4D for Oracle,
4D ODBC, or ODBC Driver for 4D Server) to establish a connection between
4D and an external SQL- or ODBC-based data source and send/receive the
data through that link.
- Write your own import or export routines. Since 4D has full access to
external files and serial ports and even to TCP streams, you can read
or write any data source you are likely to encounter. 4D developers have
implemented programs to read data from bar-code scanners, for example.