Hitachi

Hitachi Advanced Database Application Development Guide


16.7.3 SQLGetCursorName, SQLGetCursorNameW

Organization of this subsection

(1) Function

This ODBC function returns the cursor name associated with a specified statement handle.

(2) Format

(3) Arguments

StatementHandle

Specifies a statement handle.

CursorName

Specifies a pointer to the buffer in which the cursor name is to be returned.

BufferLength

Specifies the length# of *CursorName. SQL_NTS cannot be specified.

NameLengthPtr

Specifies a pointer to the buffer that stores the total valid length# that is returned to *CursorName. This length does not include the null terminating character.

#

The length must be in bytes for SQLGetCursorName and in characters for SQLGetCursorNameW.

(4) Return value

This ODBC function returns SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

(5) SQLSTATE

This ODBC function returns one of the following SQLSTATE values:

SQLSTATE

Description

Remarks

Returned

01000

General warning

--

N

01004

Character string data was right-truncated

The cursor name could not be stored because the *CursorName buffer was too small (the cursor name was truncated). The function returns SQL_SUCCESS_WITH_INFO.

Y

01S51

Code replacement occurred during conversion of character encoding

A character code that cannot be converted was detected and then replaced with the specified character. The function returns SQL_SUCCESS_WITH_INFO.

Y

HY000

General error

--

N

HY001

Memory allocation error

N

HY010

Function sequence error

Y

HY013

Memory management error

The function call could not be processed because the memory object could not be accessed.

N

HY015

No cursor name available

--

N

HY090

Invalid string or buffer length

  • The value specified in BufferLength is less than 0.

  • An invalid value (SQL_NTS) was specified in BufferLength.

Y

HYT01

Connection timeout expired

A connection timeout occurred before the data source responded to the request. The connection timeout value can be specified by using SQL_ATTR_CONNECTION_TIMEOUT in SQLSetConnectAttr or SQLSetConnectAttrW.

N

IM001

Driver does not support this function

--

N

Legend:

Y: This SQLSTATE might be returned by the HADB ODBC driver.

N: This SQLSTATE is not returned by the HADB ODBC driver.

--: None

(6) Notes