procedure TForm1.Button2Click(Sender: TObject);
Var
BlobStream:TBlobStream;
JpegImage:TJpegImage;
begin
if OpenPictureDialog1.execute then
image1.picture.LoadFromFile(OpenPictureDialog1.filename);
try
with table1 do
try
edit;
JpegImage:=TJpegImage.Create;
BlobStream:=TBlobStream.Create(TBlobField(FieldByName('p')),bmWrite);
BlobStream.Position:=0;
JpegImage:=TJpegImage(image1.Picture.Graphic);
JpegImage.SaveToStream(BlobStream);
post;
finally
if Not Assigned(BlobStream) then BlobStream.Free;
if Not Assigned(JpegImage) then JpegImage.Free;
end;
except
end;
end;