Click to See Complete Forum and Search --> : Return pic from database to Timage or else.....


Leite33
September 20th, 2006, 08:28 AM
Hi
How can i return pic from database to TImage; I used blob method to save the pics. Please help i did everything.... Is it Possible; Do i have to use other componnent; The code i used is

if ( !ADOTable1->FieldByName("File")->IsNull )
{
TStream *blob;
TJPEGImage *jp;

jp=new TJPEGImage;
blob=new TMemoryStream;
blob=ADOTable1->CreateBlobStream(ADOTable1->FieldByName("File"),bmRead);
blob->Position=0;
jp->LoadFromStream(blob);
Image1->Picture->Graphic->Assign(jp);
}

but nothing happens