DbiCloseCursor

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiCloseCursor

Return to chapter overview

C syntax

DBIResult DBIFN DbiCloseCursor (phCursor);

Delphi syntax

function DbiCloseCursor (var hCursor: hDBICur): DBIResult stdcall;

Description

DbiCloseCursor closes a cursor.

Parameters

phCursor

Type: phDBICur

(Input)

Pointer to the cursor handle to be closed.

Usage

This function can be used to close all types of cursors. For temporary tables, DbiCloseCursor removes the table from memory.

If the cursor closed is the last remaining cursor for the table in the current session, then all locks acquired with DbiAcqTableLock are released.

If the given cursor is valid, the cursor is closed even if an error message is returned. Any error returned is to inform the client of a potential problem (for example, a network problem).

Completion state

All resources associated with the cursor are released, including record locks, filters, and all indexes that have been opened by DbiOpenIndex for that particular cursor. The cursor handle is invalid after DbiCloseCursor is called (even if an error, such as a network problem, occurs).

DbiResult

Meaning

DBIERR_NONE

The table cursor was successfully closed.

DBIERR_INVALIDHNDL

The specified cursor handle is invalid or NULL.

DBIERR_NODISKSPACE

Table could not be saved to disk due to lack of space.

See also

DbiOpenTable, DbiCreateTempTable, DbiCreateInMemTable, DbiQExec, DbiQExecDirect, DbiOpenTableList, DbiOpenFileList, DbiOpenIndexList, DbiOpenFieldList, DbiOpenVchkList, DbiOpenRintList, DbiOpenSecurityList, DbiOpenFamilyList, DbiCloneCursor, DbiCloseDatabase