Qt-interest Archive, March 2002
ODBC driver and binary column types
Message 1 in thread
Hi,
I'm trying to serialise image files into a database via the ODBC driver
(eg. using the QVariant's image type). The field type into which I'm
trying to put them is reported as a LONG VARBINARY via the ODBC
interface (it's actually a MySQL LONGBLOB).
However, it seems the ODBC driver doesn't support the binary types and
hence reports the type as a string, which means the
QSqlRecord::setValue(QImage) can't be used.
I have had this working by converting the image into a very long
hexadecimal string, but this is pretty nasty and wasteful & nowhere near
as convenient. I've also noticed that other database drivers bundled
with Qt do support binary types - is there any plan to add this to the
ODBC one in the future?
Thanks for your time,
--
[ signature omitted ]