2. OpenAPI Function Reference : OpenAPI Functions : IIapi_setEnvParam() Function--Assign an Environment Parameter and Value in Environment Handle
 
Share this page                  
IIapi_setEnvParam() Function--Assign an Environment Parameter and Value in Environment Handle
The IIapi_setEnvParam() function allows the application to override the default environment logical settings established by the IIapi_initialize() for a specific environment handle.
Settings for environment parameters, which correspond to connection parameters, are used as the default connection parameter values unless specifically overridden by IIapi_setConnectParam().
Environment parameters also affect the conversions performed by IIapi_formatData() and control interactions between OpenAPI and the application.
This function has the following syntax:
II_VOID IIapi_setEnvParam (IIAPI_SETENVPRMPARM *setEnvPrmParm);
typedef struct _IIAPI_SETENVPRMPARAM
{
       II_PTR        se_envHandle;
       II_LONG       se_paramID
       II_PTR        se_paramValue
       IIAPI_STATUS  se_status
} IIAPI_SETENVPRMPARM;
This function has the following parameters:
se_envHandle
Type: input
Specifies the environment handle for the parameter being assigned.
se_paramID
Type: input
Specifies the parameter being assigned. For valid parameter ID macros, see the following list.
se_paramValue
Type: input
Specifies the value of the parameter being assigned. For the data type and description of the value associated with each parameter ID, see the following list.
se_status
Type: output
Specifies the status of the function upon its return. Its value is one of the following:
IIAPI_ST_SUCCESS
IIAPI_ST_FAILURE
IIAPI_ST_NOT_INITIALIZED
IIAPI_ST_INVALID_HANDLE
The following table lists valid parameter ID macros for the se_paramID parameter:
IIAPI_EP_CHAR_WIDTH
Data type: II_LONG
Specifies the maximum length of a character data type (IIAPI_BYTE_TYPE, IIAPI_CHA_TYPE, IIAPI_CHR_TYPE, IIAPI_VCH_TYPE).
IIAPI_EP_TXT_WIDTH
Data type: II_LONG
Specifies the maximum length of a text data type (IIAPI_TXT_TYPE).
IIAPI_EP_INT1_WIDTH
Data type: II_LONG
Specifies the length of an integer1 data type (IIAPI_INT_TYPE).
IIAPI_EP_INT2_WIDTH
Data type: II_LONG
Specifies the length of an integer2 data type (IIAPI_INT_TYPE).
IIAPI_EP_INT4_WIDTH
Data type: II_LONG
Specifies the length of an integer4 data type (IIAPI_INT_TYPE).
IIAPI_EP_FLOAT4_WIDTH
Data type: II_LONG
Specifies the length of a float4 data type (IIAPI_FLT_TYPE).
IIAPI_EP_INT8_WIDTH
Data type: II_LONG
Specifies the length of an integer8 (IIAPI_INT_TYPE) data type (ignored if connection level, co_apiLevel, is less than IIAPI_LEVEL_3).
IIAPI_EP_FLOAT8_WIDTH
Data type: II_LONG
Specifies the length of a float8 data type (IIAPI_FLT_TYPE).
IIAPI_EP_FLOAT4_PRECISION
Data type: II_LONG
Specifies the precision of a float4 data type (IIAPI_FLT_TYPE).
IIAPI_EP_FLOAT8_PRECISION
Data type: II_LONG
Specifies the precision of a float8 data type (IIAPI_FLT_TYPE).
IIAPI_EP_MONEY_PRECISION
Data type: II_LONG
Specifies the precision of a money data type (IIAPI_MNY_TYPE).
IIAPI_EP_FLOAT4_STYLE
Data type: II_CHAR
Specifies the format style of a float4 data type (IIAPI_FLT_TYPE).
IIAPI_EP_FLOAT8_STYLE
Data type: II_CHAR
Specifies the format style of a float8 data type (IIAPI_FLT_TYPE).
IIAPI_EP_NUMERIC_TREATMENT
Data type: II_CHAR
Specifies the treatment of the numeric literal. Its value is one of the following:
IIAPI_EPV_DECASFLOAT
IIAPI_EPV_DECASDEC
IIAPI_EP_MONEY_SIGN
Data type: II_CHAR
Specifies the money sign of an IIAPI_MNY_TYPE data type.
IIAPI_EP_MONEY_LORT
Data type: II_LONG
Specifies the leading or trailing money sign. Its value is one of the following:
IIAPI_CPU_MONEY_LEAD_SIGN
IIAPI_CPU_MONEY_TRAIL_SIGN
IIAPI_EP_DECIMAL_CHAR
Data type: II_CHAR
Specifies the decimal character.
IIAPI_EP_MATH_EXCP
Data type: II_CHAR
Specifies the treatment of math exceptions. Its value is one of the following:
IIAPI_EPV_RET_FATAL
IIAPI_EPV_RET_WARN
IIAPI_EPV_RET_IGNORE
IIAPI_EP_STRING_TRUNC
Data type: II_CHAR
Specifies the truncation of strings.
IIAPI_EP_DATE_ALIAS
Data type: II_CHAR
Specifies the actual data type to be used in place of the "date" data type alias. Its value is one of the following:
IIAPI_EPV_INGDATE
IIAPI_EPV_ANSIDATE
IIAPI_EP_DATE_FORMAT
Data type: II_LONG
Specifies the date format. Its value is one of the following:
IIAPI_EPV_DFRMT_US
IIAPI_EPV_DFRMT_MULT
IIAPI_EPV_DFRMT_FINNISH
IIAPI_EPV_DFRMT_ISO
IIAPI_EPV_DFRMT_GERMAN
IIAPI_EPV_DFRMT_YMD
IIAPI_EPV_DFRMT_MDY
IIAPI_EPV_DFRMT_DMY
IIAPI_EP_TIMEZONE
Data type: II_CHAR
Specifies the name of the time zone.
IIAPI_EP_NATIVE_LANG
Data type: II_CHAR
Specifies the name of the language used for error reporting. This is converted to a language code prior to sending it to the server.
IIAPI_EP_NATIVE_LANG_CODE
Data type: II_LONG
Specifies the language code of the native language used for error reporting. IIAPI_EP_NATIVE_LANG can be used when the language code is not known.
IIAPI_EP_CENTURY_BOUNDARY
Data type: II_LONG
Specifies the date century boundary.
IIAPI_EP_SEGMENT_LEN
Data type: II_LONG
Specifies the value used as the ds_length value when describing a BLOB column using IIapi_getDescriptor(), and will therefore be used as the segment length when retrieving a BLOB using IIapi_getColumns().
IIAPI_EP_TRACE_FUNC
Data type: II_PTR
Specifies the callback function pointer to the application for trace messages. For more information on setting this value, see Environment Parameter IIAPI_EP_TRACE_FUNC).
IIAPI_EP_EVENT_FUNC
Data type: II_PTR
Specifies the callback function pointer to the application for database event notification. For more information on setting this value, see Environment Parameter IIAPI_EP_EVENT_FUNC).
IIAPI_EP_CAN_PROMPT
Data type: II_PTR
Specifies the callback function pointer to the application for database password prompting. For more information on setting this value, see Environment Parameter IIAPI_EP_CAN_PROMPT).
More information:
Environment Parameter IIAPI_EP_CAN_PROMPT
Environment Parameter IIAPI_EP_TRACE_FUNC
Environment Parameter IIAPI_EP_EVENT_FUNC