Mirror

How to save a TJPEGImage to a blob field (Views: 32)


Problem/Question/Abstract:

How to save a TJPEGImage to a blob field

Answer:

{ ... }
var
  mem: TMemoryStream;
begin
  mem := tmemorystream.create;
  try
    table1.open;
    table1blobfield.savetostream(mem);
    mem.seek(0, 0);
    jpeg1.loadfromstream(mem);
  finally
    mem.free;
  end;
end;

<< Back to main page