selas
asked on
How to save picture to file without Tblobfield
now i'm using TBlobField(AdoQuery2.field byname('pi cture')).S aveToFile( 'Temp.jpg' );
it works with dbgrid
but i need to save jpg picture without db grid..
This not work:
AdoQuery2.SQL.Clear; AdoQuery2.SQL.Add('Select picture from klientai where id = '+ id +'');
AdoQuery2.Open;
if not Adoquery2.IsEmpty then //is there a picture?
begin
AdoQuery2.SaveToFile('Temp .jpg');
Image1.Picture.LoadFromFil e('Temp.jp g');
end
else
begin
Image1.Picture.Bitmap.Assi gn(Nil); //there is no Image
end;
it works with dbgrid
but i need to save jpg picture without db grid..
This not work:
AdoQuery2.SQL.Clear; AdoQuery2.SQL.Add('Select picture from klientai where id = '+ id +'');
AdoQuery2.Open;
if not Adoquery2.IsEmpty then //is there a picture?
begin
AdoQuery2.SaveToFile('Temp
Image1.Picture.LoadFromFil
end
else
begin
Image1.Picture.Bitmap.Assi
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.