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.
rc( in cCursor : cursor ):number;
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 |
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;