DB_AllocCursor Function

Action

Allocates memory for a cursor and associates the cursor with the connection specified by hDBC.

Include file

DBAPI.bdh

Syntax

DB_AllocCursor(in hDBC: number, out cCursor: cursor): number;

Return value

SQL return code

The following values are possible:

  • SQL_SUCCESS. Function completed successfully.

  • SQL_SUCCESS_WITH_INFO. Call native ODBC function SQLError for detailed information.

  • SQL_INVALID_HANDLE. Invalid database connection handle.

  • SQL_ERROR. Call native ODBC function SQLError for detailed information.

Parameter Description
hDBC Valid handle to a database connection. This handle must have been returned from a previous call to DB_Connect .
cCursor Variable receiving the allocated cursor

Example

rCode := DB_AllocCursor(hDBC, c1);

Sample scripts

DBApi01.bdf, Trans.bdf, MutexLogin.bdf