H
hawkview
Unregistered / Unconfirmed
GUEST, unregistred user!
我用了一TJPEGIMAGE控件,双击它调入图片,然后:
if openpicturedialog1.filename<>'' then
begin
picturestream:=Tblobstream.create(table1.fieldbyname('photo') as Tblobfield,bmwrite);
jpegimage1.Picture.graphic.SaveToStream(picturestream);
end;
可以插入,但读出时用以下代码:
picturestream:=Tblobstream.create(query1.fieldbyname('photo') as Tblobfield,bmread);
jpegimage1.Picture.Graphic.LoadFromStream(picturestream);
picturestream.free;
却有access violation at address.....错误,why?
if openpicturedialog1.filename<>'' then
begin
picturestream:=Tblobstream.create(table1.fieldbyname('photo') as Tblobfield,bmwrite);
jpegimage1.Picture.graphic.SaveToStream(picturestream);
end;
可以插入,但读出时用以下代码:
picturestream:=Tblobstream.create(query1.fieldbyname('photo') as Tblobfield,bmread);
jpegimage1.Picture.Graphic.LoadFromStream(picturestream);
picturestream.free;
却有access violation at address.....错误,why?