Hi all,

I found a problem (bug?) when updating a blob column via MyODBC. The
statement i run is like that:

UPDATE blob_table SET blob_col = ? where id = ?

when i do NOT bind the restriction as input parameter, but write it directly
in the string, it works perfectly.

but when i want to bind the restriction directly, the following happens:

1. I bind the blob_col with SQL_LEN_DATA_AT_EXEC(length) as indikator
(SQLBindParameter returns SQL_SUCCESS)
2. I bind the id restriction directly to a program variable
(SQLBindParameter returns SQL_SUCCESS)
3. I call SQLExecute, it returns SQL_NEED_DATA as expected.
4. I call SQLParamData to access the blob_col, it returns also SQL_NEED_DATA
as expected.
5. I call several times SQLPutData to fill the blob_col, each returns with
SQL_SUCCESS
6. I call SQLParamData to indicate that the blob_col is populated with data
completely and would expect SQL_SUCCESS.

Instead, SQL_NEED_DATA is returned and the returned pointer shows to the
second parameter (which i bound NOT with DATA_AT_EXEC)!

I browsed the ODBC documentation and found no restriction which forbids the
mix of binding parameters directly and with data at execution time.
Only restriction is on READING blob columns with SQLGetData, which cannot be
mixed with bound output columns.

So it seems to be a bug to me...

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to