UtilEnumerateColumnTypes - cDbUpdateFunctionLibrary
To enumerate data types. Pass the driver ID and the database type ID. Returns a struct array.
Type: Function
Parameters: String sDriverID, Integer iDbType
Parameter |
Description |
sDriverID |
DataFlex, MSSQLDRV_ID, DB2_DRV_ID, ODBC_DRV_ID, ORAFLEX, SQLFLEX, MDSPgSQL or MDSMySQL. |
iDbType |
Database type; Microsoft SQL Server, IBM DB2, Oracle, MySQL or PostgreSQL. This is a enumeration type and can be any of; EN_DbTypeDataFlex, EN_DbTypeMSSQL, EN_DbTypeMySQL, EN_DbTypeOracle, EN_DbTypeDB2 or EN_DbTypePostgre. |
Syntax
Function UtilEnumerateColumnTypes String sDriverID Integer iDbType Returns tColumnType[]
Call: |
Get UtilEnumerateColumnTypes DataFlex_ID EN_DbTypeDataFlex to MyColumnTypeArray |
Description
To get a list of all relevant data types for a particular driver and database. See also: tColumnType struct.
Example
Procedure OnClick
tColumnType[] ColumnTypes
Integer iSize iCount
Get UtilEnumerateColumnTypes MSSQLDRV_ID EN_DbTypeMSSQL to ColumnTypes
Move (SizeOfArray(ColumnTypes)) to iSize
Decrement iSize
For iCount from 0 to iSize
Showln ColumnTypes.sType
Showln ColumnTypes.iType
Showln ColumnTypes.sPrecision
Showln ColumnTypes.bFixedSize
Showln ColumnTypes.sDFType
Showln ColumnTypes.iDFType
Loop
End_Procedure