Please enable JavaScript to view this site.

ESL Documentation

Core subroutine

Return the cursor name for a specified statement handle.

call EDSGetCursorName(HSTMT_IV, CURSOR_SV ) 

HSTMT_IV An input integer value that indicates the statement handle.

CURSOR_SV An output string value containing the cursor name.

Description

The only SQL operation that accepts a cursor name is a positioned update or delete (for example, “UPDATE table-name ...WHERE CURRENT OF cursor-name”). If your application does not call EDSSetCursorName to define a cursor name for a positioned update or delete, the driver generates a name that begins with the letters EDS_CUR and will not exceed 18 characters in length.

EDSGetCursorName returns the name of a cursor regardless of whether the name was created explicitly or implicitly.

Return Values

EDSGetCursorName returns EDS_SUCCESS, EDS_ERROR, or EDS_INVALID_HANDLE, or EDS_SUCCESS_WITH_INFO.

When EDSGetCursorName returns EDS_ERROR, you can obtain an associated SQLSTATE value with more specific information by calling EDSError. The following table lists each typical SQLSTATE value and explains each one in the context of the command EDSGetCursorName.

The following table lists possible SQLSTATE values:

SQL

STATE

Error

Description

IM001

Driver does not support this

The driver associated with the statement handle does not support the function. function

S1000

General error

An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by EDSError in the argument ERRORTEXT describes the error and its cause.

S1001

Memory allocation failure

The driver was unable to allocate the memory required to support execution or completion of the function.

S1010

Function sequence error

An asynchronously executing function (not this one) was called for the statement handle and was still executing when this function was called.

S1015

No cursor name available

There was no open cursor on the statement handle and no cursor name had been set with EDSSetCursorName. The statement associated with the statement handle does not support the use of a cursor. For example, the CREATE TABLE statement.

See Also

EDSSetCursorName associates a name and statement with a cursor.

EDSPrepare prepares a statement for execution.

EDSExecute and EDSExecDirect execute a statement.

EDSSetScrollOptions establishes a scrollable cursor.