By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,020 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,020 IT Pros & Developers. It's quick & easy.

MySQL prepared statements API

P: n/a
I'm using the prepared statements part of the C API since it appears
to be the only way to get data from the database in binary form.

There appears to be a design flaw in the current API - it seems to be
impossible to get the maximum length for the data in each column of a
result set even when you store the entire result to the client (using
mysql_stmt_store_result). The column metadata returned by
mysql_prepare_result has nothing to do with any particular execution
and therefore does not contain max length information. However,
mysql_fetch retrieves both the data and the data length in one step,
so it appears impossible to discover beforehand how big a buffer one
needs to receive the data (for variable length fields like blob, etc.)

Is there no solution to this?
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.