如何在ACCESS数据库中存储图片数据?
如何在ACCESS数据库中存储图片数据?选择什么数据类型?
怎样将图片资料存入数据库?
//打开
if (OpenDialog1.Execute) then
begin
Image1.Picture.Create ;
Image1.Picture.LoadFromFile ( OpenDialog1.FileName );
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
// 插入
ADOTable1.Edit ;
ADOTable1.Insert ;
ADOTable1Tu.Assign( Image1.Picture.Bitmap );
ADOTable1BuWei.Value :=OpenDialog1.FileName;
ADOTable1.Post ;end;
procedure TForm1.Button3Click(Sender: TObject);
begin
//修改
ADOTable1.Edit ;
ADOTable1Tu.Assign( Image1.Picture.Bitmap );
ADOTable1.Post ;