Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

ipNative

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

You must implement this method in your IP if it is to handle the execution of commands that the OpenAccess SDK SQL engine is unable to parse. This method is called if during the parsing of a SQL command there is a syntax error.

In this case, the OpenAccess SDK SQL engine calls ipNative in the IP to check whether it can handle the parsing. If ipNative returns true, then it is called again to execute the command.

Currently, only commands that do not return rows are supported. ipGetSupport should return true for IP_SUPPORT_NATIVE_COMMAND.

int ipNative(
    long   hstmt,
    int    iCmdType,
    String szCmd, 
    xo_long piNumResRows)

Parameters for ipNative

Parameter Type Description
INPUT
hstmt long Statement handle of the currently active statement.
iCmdType int DAM_NC_VALIDATE - validate the passed in command.
DAM_NC_EXECUTE - execute the native command and return the number of rows affected.
szCmd String The command to execute.
piNumResRows xo_long The number of rows affected by this operation.
RETURN
int DAM_SUCCESS - in DAM_NC_VALIDATE mode, this indicates that the command is something that is supported. In DAM_NC_EXECUTE mode, this indicates that the command was successfully executed.
DAM_FAILURE - indicates there is a syntax error in the native command. The specific error message should be added using the dam_addError method.
DAM_NOT_AVAILABLE - in DAM_NC_VALIDATE mode, the command issued is not supported.

The ipNative method can call dam_setIP_hstmt to save any context it creates during validation and use dam_getIP_hstmt to retrieve the context when called for DAM_NC_EXECUTE.

See also

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