Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load jpeg images from DATABASE

Status
Not open for further replies.

luistsousa

Technical User
May 12, 2003
66
PT
Hello everybody

I am try to read jpeg images from a database MYSQL, with TTable.

I used :
DataModule1->Table1->Append();
if (OpenPictureDialog1->Execute())
DBImage1->Picture->LoadFromFile (OpenPictureDialog1->FileName);
DataModule1->Table1->Post();

To put images in a blob field. I think its work, at least with BMP's.

How Can I take the jpeg images from database and put in a TImage ??? I try with some example code, but nothing.


Many thanks
Luis
 
have you got &quot;#include <jpeg.hpp>&quot; in your header file.

tomcruz.net

 
Yes.

Usually appear the error #41 in jpeg.

Regards
 
youve got a dbimage on the form , how about using assign to copy the dbimage to the image.

tomcruz.net
 
Hi

Thanks Tom. I resolve my problem only with bmp images.

BEst regards
 
if you can display the image from the table in the dbimage object you can use assign the image to the TImage.

Image1->Picture->Assign (DBImage1->Picture);

I have tried though and I cant seem to save a jpg to the table on my end. Its got my curiosity up. I had thought for sure that I had made a program last year for my wife that saved jpg. I am probably mistaken. Im sure it can be done though.

tomcruz.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top