pointtozero
Programmer
- Dec 15, 2010
- 2
Hiya,
I have a valid mysql connection to a MySQL database. What I want is to display a picture from the DB in TImage control. The pictures are stored as BLOB and LONGBLOB data types. This is how I get the image:
So, row[0] contains the image data, but it's char *. I have no idea how to display this array of char in the TImage control. Help me, please.
I'm using C++ Builder 6 and MySQL API for connecting.
Thank you!
I have a valid mysql connection to a MySQL database. What I want is to display a picture from the DB in TImage control. The pictures are stored as BLOB and LONGBLOB data types. This is how I get the image:
Code:
mysql_query(conn, "SELECT picture FROM customers WHERE name='John Smith'");
res = mysql_store_result(conn);
row = mysql_fetch_row(res);
So, row[0] contains the image data, but it's char *. I have no idea how to display this array of char in the TImage control. Help me, please.
I'm using C++ Builder 6 and MySQL API for connecting.
Thank you!