Displaying image from DB
Posted by: Angel Zaslavsky
Date: December 14, 2010 10:01AM

Hi,

I have a valid mysql connection, and this is how I get the image from DB:

mysql_query(conn, "SELECT picture FROM customers WHERE name='John Smith'");
res = mysql_store_result(conn);
row = mysql_fetch_row(res);

I have a TImage control on my form, and I'd like to display the image from row[0] which is char *, but I cannot find a way to do that. Images are stored as BLOB in my database. So, how can I display one of them in my TImage control?

I use C++ Builder 6 and MySQL API for connecting.

Thank you!

Options: ReplyQuote


Subject
Views
Written By
Posted
Displaying image from DB
850
December 14, 2010 10:01AM
402
December 15, 2010 07:50AM


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.