Hitachi

Hitachi Advanced Database Application Development Guide


16.8.1 SQLExecute

Organization of this subsection

(1) Function

This ODBC function executes a prepared statement using the current parameter values if parameter markers exist in the statement.

(2) Format

SQLRETURN SQLExecute
(
  SQLHSTMT        StatementHandle     /* In */
)

(3) Arguments

StatementHandle

Specifies a statement handle.

Specify a value that was output by *OutputHandlePtr of SQLAllocHandle before this function is executed.

(4) Return value

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

(5) SQLSTATE

This ODBC function returns one of the following SQLSTATE values:

SQLSTATE

Description

Remarks

Returned

01000

General warning

--

N

01001

Cursor operation conflict

N

01003

NULL value eliminated in set function

N

01004

Character string data was right-truncated

Y

01006

Privilege not revoked

N

01007

Privilege not granted

N

01S02

Option value changed

N

01S07

Fractional truncation

N

07002

COUNT field incorrect

The number of parameters specified in SQLBindParameter does not match the number of dynamic parameters.

Y

07006

Restricted data type attribute violation

--

N

07007

Restricted parameter value violation

N

07S01

Invalid use of default parameter

N

08S01

Communication link failure

N

08003

Connection does not exist

Y

21S02

Degree of derived table does not match column list

N

22001

Character string data was right-truncated

Y

22002

Required indicator variable not supplied

N

22003

Numeric value out of range

Y

22007

Invalid datetime format

Y

22008

Datetime field overflow

Y

22012

Division by zero

N

22015

Interval field overflow

N

22018

Invalid character value for cast specification

Y

22019

Invalid escape character

N

22025

Invalid escape sequence

N

23000

Integrity constraint violation

N

24000

Invalid cursor status

Y

40001

Serialization failure

N

40003

Statement completion unknown

N

42000

Syntax error or access violation

N

44000

WITH CHECK OPTION violation

N

5C002

Character encoding conversion error

A character code that cannot be converted was detected.

Y

5C036

Data conversion error

The contents of the requested input data are invalid.

Y

5C041

Unsupported data type error

The driver does not support the specified data type.

Y

HY000

General error

--

N

HY001

Memory allocation error

Y

HY003

Invalid C data type

Y

HY004

Invalid SQL data type

Y

HY008

Operation cancelled

N

HY009

Invalid use of null pointer

Y

HY010

Function sequence error

Prepare has not been executed yet.

Y

HY013

Memory management error

--

Y

HY014

Invalid precision or scale value

Y

HY090

Invalid string or buffer length

Y

HY104

Invalid precision or scale value

Y

HY105

Invalid parameter type

N

HY109

Invalid cursor position

N

HY117

Connection suspended

The Disconnect and r-only functions are permitted.

N

HYC00

Optional feature not implemented

--

Y

HYT00

Timeout expired

N

HYT01

Connection timeout expired

N

IM001

Driver does not support this function

N

IM017

Invalid asynchronous polling

N

IM018

Incomplete asynchronous execution

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