Board index » delphi » Image in Paradox file

Image in Paradox file

Hello
Could you tell me how to insert images file into table with BLOB fields and
get image file from this table to show on DBImage.

Thank you
Nhuyen

http://www.zfree.co.nz

 

Re:Image in Paradox file


Example:

var
  B: TBitmap;
begin
  B := TBitmap.Create;
  try
    B.LoadFromFile('image.bmp');
    Table1.Edit;
    try
      Table1.FieldByName('Image').Assign(B);
      Table1.Post;
    except
      Table1.Cancel;
      raise;
    end;
  finally
    B.Free;
  end;
end;

ps. TDBImage can only display .bmp images. For jpg you need to use a TImage
and update the display in the AfterScroll event using a TBlobStream.

Quote
"Nhuyen" <sonphu...@zfree.co.nz> wrote in message

news:3b94a756$1@zfree.co.nz...
Quote

> Hello
> Could you tell me how to insert images file into table with BLOB fields
and
> get image file from this table to show on DBImage.

> Thank you
> Nhuyen

> http://www.zfree.co.nz

Other Threads