MySQL Forums
Forum List  »  Connector/ODBC

Mysql ODBC 8.0.15 SQLFetch returns SQL_NO_DATA for a Select query with where clause if one of the selected fields is blob. Works fine for 5.3.6
Posted by: Sunny Taksande
Date: February 18, 2019 11:54PM

Hi

We have the following table with 3 fields -

mysql> desc `b306_Blob_Last`;
+--------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| Num | smallint(6) | NO | PRI | NULL | |
| Alpha | varchar(10) | YES | | NULL | |
| myBlob | mediumblob | YES | | NULL | |
+--------+-------------+------+-----+---------+-------+


The prepare statement is of the form -
SELECT `Num`,`Alpha`,`myBlob` FROM `b306_Blob_Last` WHERE `Num` BETWEEN ? AND ? ORDER BY `Num`

We are binding 2 inputs (of where clause) using SQLBindParameter and 2 outputs (Num and Alpha) using SQLBindCol. For blob field - 'myBlob' we did not bind any variable.

The query gets executed succesfully but SQLFetch returns SQL_NO_DATA even if there is data in the table that matches the where criteria.

This works fine for 5.3.6 driver but not for 8.0.15.

Also a simple query like - SELECT `Num`,`Alpha`,`myBlob` FROM `b306_Blob_Last` works fine even if we dont bind the blob field - 'myBlob'.

Let us know if any body needs more information.

Thanks

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.