DF_FIELD_NATIVE_TYPE¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
Use this attribute to get or set the Native type for a specific field in a table. The native type refers to the data type of the field on the SQL backend. Setting this attribute can only be done during table creation or inside of a Structure_Start. When setting this attribute, it is good practice to use the constants mentioned below instead of the integers. For a list of these constants, refer to the sections: “Oracle Data Types”, “MySQL Data Types”, “PostgreSQL Data Types”, and “SQL Server Data Types” included in this document. Note that when getting the value for this attribute, an integer will be returned so these lists of constants can again prove useful.
Syntax
Set_Attribute DF_FIELD_NATIVE_TYPE of {FileNumber} {FieldNumber} to {variable}
Get_Attribute DF_FIELD_NATIVE_TYPE of {FileNumber} {FieldNumber} to {variable}
Parameter |
Description |
---|---|
FileNumber |
Number of the file |
FieldNumber |
Number of the field |
variable |
variable for the native data type |
Example
open Customer
Integer iColumn iType
Handle hFile
Move Customer.File_Number to hFile
Structure_Start hFile "ORA_DRV"
Set_Attribute DF_FIELD_NATIVE_TYPE of hFile iColumn to "eSQLServer_DATE"
Get_Attribute DF_FIELD_NATIVE_TYPE of hFile iColumn to iType
Structure_End hFile DF_STRUCTEND_OPT_NONE "." 0