J
jesse.zhou
Unregistered / Unconfirmed
GUEST, unregistred user!
with query1 do
begin
close;
sql.clear;
sql.add(insert into picture(photo) valuesphoto);
if image1.Picture.Bitmap.Empty=true then
parameters.ParamByName('photo').Assign(nil)
else
begin
try
ms:=Tmemorystream.Create;
Image1.Picture.Graphic.SaveToStream(ms);
ms.Position:=0;
parameters.ParamByName('photo').LoadFromStream(ms,ftgraphic);
finally
ms.Free;
end;
end;
如果沒有插入圖片,保存時揭示參數不能空,請幫我
begin
close;
sql.clear;
sql.add(insert into picture(photo) valuesphoto);
if image1.Picture.Bitmap.Empty=true then
parameters.ParamByName('photo').Assign(nil)
else
begin
try
ms:=Tmemorystream.Create;
Image1.Picture.Graphic.SaveToStream(ms);
ms.Position:=0;
parameters.ParamByName('photo').LoadFromStream(ms,ftgraphic);
finally
ms.Free;
end;
end;
如果沒有插入圖片,保存時揭示參數不能空,請幫我