if OpenPictureDialog1.Execute then
begin
if not(Table1.State in [dsEdit, dsInsert]) then Table1.Edit;
(Table1.FieldByName('Zhaopian') as TBlobField).LoadFromFile(OpenPictureDialog1.FileName);
Table1.Post;
end;
存取BMP的方法
procedure TForm6.OfficeButton1Click(Sender: TObject);
var
B: TBitmap;
begin
B := TBitmap.Create;
try
if opendialog1.Execute then
begin
B.LoadFromFile(opendialog1.FileName);
DBImage1.Picture.Assign(B);
end
finally
B.Free;
end;
end;