Q
qiujsh
Unregistered / Unconfirmed
GUEST, unregistred user!
我是这么写的,图版字段用的是blob类型,但总是出错
procedure TForm1.BitBtn2Click(Sender: TObject);
var
ms:TMemoryStream;
begin
Ms:=TmemoryStream.Create;
Image1.picture.bitmap.SaveToStream(ms);
ms.Seek(0,0);
adoq_tmp.Close;
adoq_tmp.SQL.Text :='update corppicture set corppicture1=:corppicture1 where '+
' fullcorpcode=''' + dbedit1.Text+'''' ;
//adoq_tmp.Parameters.ParamByName('corppicture1').assign(image1.Picture.Graphic);
adoq_tmp.Parameters.ParamByName('corppicture1').loadFromStream(ms,ftblob);
adoq_tmp.ExecSQL ;
ms.Free;
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
var
ms:TMemoryStream;
begin
Ms:=TmemoryStream.Create;
Image1.picture.bitmap.SaveToStream(ms);
ms.Seek(0,0);
adoq_tmp.Close;
adoq_tmp.SQL.Text :='update corppicture set corppicture1=:corppicture1 where '+
' fullcorpcode=''' + dbedit1.Text+'''' ;
//adoq_tmp.Parameters.ParamByName('corppicture1').assign(image1.Picture.Graphic);
adoq_tmp.Parameters.ParamByName('corppicture1').loadFromStream(ms,ftblob);
adoq_tmp.ExecSQL ;
ms.Free;
end;