f2s_convert_dat_full¶

Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers

Syntax

f2s_convert_dat_full {FileNumber} [{options} {table}]

Parameter

Description

FileNumber

The Dataflex filelist number.

options

f2s_STRUCTEND_OPT_FORCE_NOT_NULL - This option set all of the field properties NOT NULL

f2s_STRUCTEND_OPT_CREATE_ROWID_TABLE - This option will use RowID rather than RECNUM

table

Name of table to use instead of physical name (optional)

Description This command takes the validates the driver and makes a call with the options to f2s_calldrv_convert_dat to convert a Dataflex Data file to a SQL table.

Example
     String sPhysicalFileName
     String sDriver
     Integer iFileNumber iNumDrivers iDriver

     // filenumber of the dataflex data file
     Move 52 to iFileNumber
     Get_Attribute DF_NUMBER_DRIVERS to iNumDrivers
     For iDriver from 1 to iNumDrivers
         Get_Attribute DF_DRIVER_NAME of iDriver to sDriver
         If ((lowercase(sDriver)) contains "f2s") Break
     Loop
     Get_Attribute DF_FILE_ROOT_NAME of iFileNumber to sPhysicalFileName

     f2s_convert_dat_full iFileNumber
     Set_Attribute DF_FILE_ROOT_NAME of iFileNumber to  (Trim((LowerCase(sDriver))) + ":" +(Trim(sPhysicalFileName)))
Example with options
     String sPhysicalFileName
     Integer iFileNumber

     // dataflex filelist number
     Move 52 to iFileNumber

     //create a table "AddressValidation"
     f2s_convert_dat_full iFileNumber f2s_STRUCTEND_OPT_FORCE_NOT_NULL "AddressValidation"

Related Commands

  • f2s_convert_dat_structure

  • f2s_convert_dat_structure

  • f2s_copy_data

Replaces: CONVERT_DAT_FILE