Hitachi

Hitachi Advanced Database Application Development Guide


16.8.4 SQLParamData

Organization of this subsection

(1) Function

Used together with SQLPutData, the SQLParamData function sends parameter data when the SQL statement is executed or after SQLExecute, SQLExecDirect, or SQLExecDirectW has been executed.

(2) Format

SQLRETURN SQLParamData
(
  SQLHSTMT        StatementHandle,    /* In */
  SQLPOINTER    * ValuePtrPtr         /* Out */
)

(3) Arguments

StatementHandle

Specifies a statement handle.

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

ValuePtrPtr

Returns a pointer to the location at which the parameter data for the SQL statement is set.

A valid value is returned only when the function's return value is SQL_NEED_DATA.

This value is the same as the ParameterValuePtr value of SQLBindParameter or the TargetValuePtr value of SQLBindCol as well as the value specified in the SQL_DESC_DATA_PTR field of the descriptor record.

(4) Return value

This ODBC function returns SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA, SQL_NEED_DATA, 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

Y

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

08003

Connection does not exist

Y

08S01

Communication link failure

N

22001

Character string data was right-truncated

Y

22003

Numeric value out of range

Y

22007

Invalid datetime format

Y

22008

Datetime field overflow

Y

22018

Invalid character value for cast specification

Y

22026

Character string data length mismatch

N

40001

Serialization failure

N

40003

Statement completion unknown

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

NULL is specified in ParameterCountPtr.

Y

HY010

Function sequence error

--

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

HY117

Connection suspended

N

HYC00

Optional feature not implemented

Y

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