4D v14.3

EXPORT ODBC

Home

 
4D v14.3
EXPORT ODBC

EXPORT ODBC 


 

EXPORT ODBC ( sourceTable {; project {; *}} ) 
Parameter Type   Description
sourceTable  String in Name of table in ODBC data source
project  BLOB in Contents of export project
in New contents of export project (if * is passed)
Operator in Display of export dialog box and project update

The EXPORT ODBC command is used to export data in the sourceTable table of an external ODBC source. 

If you call the EXPORT ODBC command outside of a connection opened previously using the SQL LOGIN command, the ODBC data source selection dialog box is displayed: 

Windows

Mac OS

If the user clicks Cancel in this dialog box, execution is stopped and the system variable OK is set to 0.

Note: This command cannot be used in the case of connections with the internal SQL kernel of 4D.

If you do not pass the optional project parameter, 4D displays the ODBC export dialog box, which allows the user to configure the operation. For more information about this dialog box, refer to the Design Reference manual.

If you pass a BLOB containing a valid ODBC export project in the project parameter, the export will be carried out directly, without any user intervention. To do this, you simply need to load a project that has been saved on disk beforehand into the field or the BLOB variable that you pass in the project parameter, using the DOCUMENT TO BLOB command. ODBC export projects are saved via the ODBC export dialog box.

You can also use the EXPORT ODBC command with an empty project parameter and the optional * parameter, then store the project parameter in a BLOB field (see below). On the one hand, this solution lets you store the project with the data file and, on the other, to avoid the phase of loading it from the disk into a BLOB.

Note: Refer to the EXPORT DATA command for an example concerning the definition of an empty project. Please note that projects generated in the ODBC export dialog box are not compatible with the commands or the standard export dialog box of 4D.

The optional * parameter, if it is set, displays the ODBC data export dialog box with the settings defined in project (if any). This allows you to use a predefined project while still being able to modify one or more parameters. Moreover, in this case, the project parameter contains the parameters of the “new” project after the dialog box is closed. You can then store it in a BLOB field, in a file on disk, etc.

If the user clicks Cancel in either of the two dialog boxes (for selecting the data source or the export settings), the system variable OK is set to 0. If the export is carried out correctly, the system variable OK is set to 1.

 
PROPERTIES 

Product: 4D
Theme: Import and Export
Number: 881

The OK variable is changed by the command

 
HISTORY 

Created: 4D 2004
Renamed: 4D v12

 
SEE ALSO 

IMPORT ODBC
Overview of SQL Commands

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : SQL EXPORT ( 4D v11 SQL Release 6)