A list of keywords, separated by commas, corresponding to each parameter that the application may specify in parentheses when creating a column of the corresponding type.
Database
The DataFlex SQL Drivers (SQL Server, DB2 and ODBC), revision 5 and higher
String, temporary
Read Only
"length", "precision", "scale", ""
Use cli.pkg
Get_Attribute DF_DATABASE_TYPE_CREATE_PARAMS of {driverNumber} {databaseHandle} {typeNumber} ;
to {StringVariable}
Type_Createparams_L, Type_Createparams_LP, Type_Createparams_NONE
A list of keywords, separated by commas, corresponding to each parameter that the application may specify in parentheses when creating a column of the corresponding type.
The keywords in the list can be any of the following: length, precision, or scale.
They appear in the order that the syntax requires them to be used. For example, CREATE_PARAMS for DECIMAL would be "precision,scale"; CREATE_PARAMS for VARCHAR would equal "length."
An empty string is returned if there are no parameters for the data type definition; for example, INTEGER.
Several type attributes can be queried. Types are identified by the database handle and the ordinal position of the type.
The sample code below shows type attributes of all types in a database.
Procedure ShowTypes Integer iDriver Handle hDatabase
Integer iNumTypes
Integer iType
String sTypeName
Handle hTypeID
Boolean bAutoinc
Boolean bUnsigned
Integer iMaxSize
String sCreateParams
Get_Attribute DF_DATABASE_NUMBER_TYPES of iDriver hDatabase to iNumTypes
For iType from 0 to (iNumTypes - 1)
Get_Attribute DF_DATABASE_TYPE_NAME Of iDriver hDatabase iType To sTypeName
Get_Attribute DF_DATABASE_TYPE_ID Of iDriver hDatabase iType To hTypeID
Get_Attribute DF_DATABASE_TYPE_AUTOINC Of iDriver hDatabase iType To bAutoinc
Get_Attribute DF_DATABASE_TYPE_UNSIGNED Of iDriver hDatabase iType To bUnsigned
Get_Attribute DF_DATABASE_TYPE_MAXSIZE Of iDriver hDatabase iType To iMaxSize
Get_Attribute DF_DATABASE_TYPE_CREATE_PARAMS Of iDriver hDatabase iType To sCreateParams
Showln " " iType ", " sTypeName ", " hTypeID ", " (If(bAutoinc, "Auto Increment", "NO Auto Increment")) ", " ;
(If(bUnsigned, "Unsigned", "Signed")) ", " iMaxSize ", " sCreateParams
Loop
End_Procedure // ShowTypes
The database handle can be obtained via the DF_DATABASE_ID attribute.