I am finding the documentation located at
http://www.mysql.com/doc/en/C_API_Prepared_statement_datatypes.html on
the C API Prepared Statement Interface to be a bit unclear.

In the MYSQL_BIND datatype, when using mysql_bind_param() and
mysql_excute() to pass parameters to a prepared statment, how does one
specify the length of the parameters that will be passed? There are
two fields, buffer_length and length, both of are documented to
specify the length of input arguments.

For buffer_length we have: "For character and binary C data, the
buffer_length value specifies the length of *buffer when used with
mysql_bind_param()."

In turn for length we have "For input parameter data binding, length
points to an unsigned long variable that indicates the length of the
parameter value stored in * buffer; this is used by mysql_execute()"

One might conclude that mysql_bind_param() uses buffer_length to tell
the server about the max argument length, and that mysql_execute()
uses length to decide how much data to actually send for a given
invocation. Is this correct?

Thanks,
Richard Tibbetts

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to