RC Function

Action

Gets the return code of the most recent ODBC function call associated with a cursor. If this function returns zero, the most recent SQL command or fetch statement was executed successfully; otherwise, rc returns a nonzero value.

Note: This function only works with Silk Performer's high-level database access interface. If you use it with the medium- or native-level interface, the return value of the rc-function will be undefined.

Syntax

rc( in cCursor : cursor ):number;

Return value

zero if the most recent SQL command or fetch statement was executed successfully, otherwise the return code of the most recent ODBC function call.

Parameter Description
cCursor Cursor with which the function call is associated

Example

var
v_artno, v_stock, v_quantity: number;

dcltrans
  transaction TMain
  begin
    c1: SelArticle();
    write("return code: ");
    write (rc(c1));
  end TMain;

dclsql
  SelArticle:
    SELECT stock, quantity
    INTO :v_stock, :v_quantity
    FROM article
    WHERE articlenumber = :v_artno;