OraClose Function

Action

Closes a cursor and releases all allocated resources.

Include file

Ora.bdh

Syntax

OraClose( inout cCursor: cursor ): boolean;

Return value

  • true if successful

  • false otherwise. In this case, you can use the OraOciError function to retrieve the Oracle OCI error code

Parameter Description
cCursor Cursor associated with a database connection.

Example

var
  hConnection : number;
  cCursor     : cursor;

dcltrans
  transaction TMain
  var
    bOk  : boolean;
  begin
    OraLogon(hConnection, "user", "password", "orclnet2");
    OraOpen(cCursor, hConnection);
    ...

    bOk := OraClose(cCursor);
    if bOk then
      write("Cursor successfully closed"); writeln;
    else
      write("Could not close cursor"); writeln;
    end;

    OraLogoff(hConnection);
  end TMain;

Output

Cursor successfully closed

Sample scripts

OraArrayFetch.bdf, OraSample.bdf, OraLoadPers.bdf