OraIgnoreError Function

Action

Specifies that a specific Oracle OCI error is to be ignored if it occurs during the next Silk Performer Oracle API function call. Since the error is then treated in the same way as a warning, the simulation will not be aborted.

Include file

Ora.bdh

Syntax

OraIgnoreError( in cCursor    : cursor,
                in nErrorCode : number): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
cCursor Cursor associated with a database connection
nErrorCode Oracle OCI error code. This error will be treated as a class 0 error (warning) for the next Silk Performer Oracle API call

Example

var
  hConnection : number;
  cCursor     : cursor;

dcltrans
  transaction TMain
  begin
    OraLogon(hConnection, "user", "password", "orclnet2");
    OraOpen(cCursor, hConnection);
    OraParse(cCursor, sqlDelete);

    // ignore Oracle error 900: invalid SQL statement
    OraIgnoreError(cCursor, 900);

    // execute invalid SQL statement
    OraExec(cCursor);
     
    OraClose(cCursor);
    OraLogoff(hConnection);
  end TMain;

dclsql
  sqlDelete:
    REMOVE FROM my_table; // invalid SQL statement