f2s_get_sql_script¶

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

Syntax

f2s_get_sql_script {variable}

Parameter

Description

variable

UChar[] array to hold the SQL script

Description

Scripting is used for testing and preparation of table creation or restructure. Calling this command after a f2s_scripting_mode block will retrieve the SQL script needed to make the changes that would have been made during restructuring. This can then be examined without having to make actual changes.

The mock .INT file that would be produced from the restructure can be retrieved using the command f2s_get_int.

Example
   handle hUser
   integer iNewColumn
   uChar [] INTFile
   uChar [] SQLScript

   move Users.File_Number to hUser

   set_attribute f2s_scripting_mode of _f2s_ActiveDriverID to true
   Create_field hUser at iNewColumn
   Set_Attribute DF_FIELD_NAME of hUser iNewColumn to "Start_Date"
   Set_Attribute DF_FIELD_TYPE of hUser iNewColumn to DF_DATE
   set_attribute f2s_scripting_mode to false

   f2s_get_int INTFile
   f2s_get_sql_script SQLScript

Related Commands

  • f2s_get_int

Replaces: Command GET_SQL_SCRIPT_CHUNK