Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

dam_describeCond

  • Last Updated: May 12, 2026
  • 2 minute read
    • OpenAccess SDK
    • Version 9.0
    • Documentation

This method is used to retrieve the description of the condition. Use this method to retrieve the condition (=, >, <, etc.) and the value of the operand is ('TAG', 100, etc.). The condition is returned as a left and right pair. The right part only applies in the case of BETWEEN or LIKE type of conditions. For other conditions, when the right part is requested, a value of 0 is returned for the operator type. Each condition is described by the operator type, the value of the operand, and the data type of the operand value. You must use the method dam_getCondVal and/or dam_getCondRightVal to get the data for the condition.

int dam_describeCond(
    long   hcond,
    xo_int piLeftOpType, 
    xo_int piLeftXOType,
    xo_int piRightOpType, 
    xo_int piRightXOTpe)

Parameters for dam_describeCond

Parameter Type Description
INPUT
hcond long The condition handle.
OUTPUT
piLeftOpType xo_int The left operator type. See Table Operator Types for Conditions for the operators and the associated value. All conditions always have a left value. You must create and pass in an object of type xo_int for this argument.
piLeftXOType xo_int The data type. You must create and pass in an object of type xo_int for this argument.
piRightOpType xo_int The right operator type. See Table Operator Types for Conditions for the operators and the associated value. This value is only present in BETWEEN and LIKE type of statements. A value of 0 is returned if there is no right value. You must create and pass in an object of type xo_int for this argument.
piRightXOType xo_int The data type. You must create and pass in an object of type xo_int for this argument.
RETURN
int DAM_SUCCESS - valid condition returned.
DAM_FAILURE - error occurred while getting a condition because the arguments to the call are invalid or the format of the data in the condition cannot be converted to the column type.

Table Operator Types for Conditions shows the operators that are allowed in a condition. Refer to Default Optimization of the OpenAccess SDK Programmer's Guide for examples on the operator values returned by this method to describe conditions like VALUE>=xxx and VALUE BETWEEN xxx AND yyy.

Operator Types for Conditions

Operator Description
SQL_OP_SMALLER The column value should be smaller than. Set this bit if <, <=, or BETWEEN predicates are used in the SQL query.
SQL_OP_GREATER The column value should be greater than. Set this bit if >, >=, or BETWEEN predicates are used in the SQL query.
SQL_OP_LIKE The column value should be LIKE. The ppRightData will contain a valid pointer to XO_TYPE_CHAR data if an ESCAPE clause was used with LIKE.
SQL_OP_ISNULL The column value should be NULL.
SQL_OP_EQUAL The column value should be equal. This bit is set if <=, >=, or BETWEEN predicates are used in the SQL query.
SQL_OP_NOT This operator occurs always in combination with either SQL_OP_NULL or SQL_OP_EQUAL and implies that the column value should not be NULL and column value should not be EQUAL respectively.

See also

TitleResults for “How to create a CRG?”Also Available inAlert