UtilColumnTypeToInteger - cDbUpdateFunctionLibrary

To convert between a data type string name and its integer constant. Returns an integer value.


Type: Function


Parameters: String sDriverID, Integer iDbType, String sDataType

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.

sDataType

E.g. "VarChar" -> SQL_VarChar (If driver is MSSQLDRV_ID and the iDbType is EN_DbTypeMSSQL)


Syntax


Function UtilColumnTypeToInteger String sDriverID Integer iDbType String sDataType Returns Integer

Call:

Get UtilColumnTypeToInteger DataFlex_ID EN_DbTypeDataFlex "VarChar" to iDataType



Description

To convert between a string data type and its data type constant. The reciprocal of the UtilColumnTypeToString function. See also:  tColumnType struct definition.



Example


Procedure OnClick

    Integer iDataType

   

    Get UtilColumnTypeToInteger MSSQLDRV_ID EN_DbTypeMSSQL "VarChar" to iDataType

End_Procedure