Delphi-Quellcode:
procedure TForm7.SavePic;
var
bS : TADOBlobStream;
Pic : TJpegImage;
begin
bS := TADOBlobStream.Create(AdoTable1Picture, bmWrite);
try
Pic.Assign(AdoImage);
try
Pic.SaveToStream(bS);
bs.Position := 0;
TBlobField(Table1.FieldByName('Bild')).LoadFromStream(bs);
finally
Pic.Free;
end;
finally
bS.Free
end;
end;
Delphi-Quellcode:
if Button = nbPost then
begin
LoadPIC.Visible := false;//TButton
SavePIC;
erzeugt nur einern "Stream Lesefehler" in der
DB werden nur die eingaben von den DBEdit Feldern gespeichert