Oracle 5.0 Reference Manual page 2213

Table of Contents

Advertisement

in place of the corresponding parameter marker in the statement (specified with
string).
For output,
buffer
you call mysql_stmt_fetch(), MySQL stores a column value from the current row of the result
set in this variable. You can access the value when the call returns.
To minimize the need for MySQL to perform type conversions between C language values on the
client side and SQL values on the server side, use C variables that have types similar to those of
the corresponding SQL values:
• For numeric data types,
For integer variables (which can be
values), you should also indicate whether the variable has the
member, described later.
is_unsigned
• For character (nonbinary) and binary string data types,
buffer.
• For date and time data types,
For guidelines about mapping between C types and SQL types and notes about type conversions,
see
Section 20.6.8.1, "C API Prepared Statement Type
Prepared Statement Type
unsigned long buffer_length
The actual size of
*buffer
stored in the buffer. For character and binary C data, the
length of
when used with
*buffer
the maximum number of output data bytes that can be fetched into the buffer when used with
mysql_stmt_bind_result().
unsigned long *length
A pointer to an
unsigned long
in *buffer.
length
For input parameter data binding, set
stored in *buffer. This is used by mysql_stmt_execute().
For output value binding, MySQL sets
mysql_stmt_fetch()
• If the return value is 0,
• If the return value is MYSQL_DATA_TRUNCATED,
the parameter value. In this case, the minimum of
actual length of the value.
is ignored for numeric and temporal data types because the
length
determines the length of the data value.
If you must determine the length of a returned value before fetching it, see
"mysql_stmt_fetch()", for some strategies.
my_bool *is_null
This member points to a
For input, set
*is_null
parameter.
C API Prepared Statement Data Structures
is a pointer to the variable in which to return a result set column value. When
should point to a variable of the proper numeric C type.
buffer
char
should point to a
buffer
Conversions".
in bytes. This indicates the maximum amount of data that can be
mysql_stmt_bind_param()
variable that indicates the actual number of bytes of data stored
is used for character or binary C data.
*length
*length
return value determines how to interpret the length:
indicates the actual length of the parameter value.
*length
variable that is true if a value is NULL, false if it is not NULL.
my_bool
to true to indicate that you are passing a
2193
for single-byte values or an integer type for larger
unsigned
should point to a character
buffer
MYSQL_TIME
Codes", and
buffer_length
to indicate the actual length of the parameter value
when you call mysql_stmt_fetch(). The
indicates the nontruncated length of
*length
and
*length
NULL
in the statement
?
attribute by setting the
structure.
Section 20.6.8.2, "C API
value specifies the
to specify input values, or
indicates the
buffer_length
value
buffer_type
Section 20.6.10.11,
value as a statement

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents