有代码如下,但不知TBlobStream要uses什么才能编译通过
var
m_blob:TBlobStream;
m_jpeg:TJpegImage;
begin
image.Picture:= nil;
m_blob:=TBlobStream.Create(TBlobField(table.FieldByName('照片')),bmRead);
m_jpeg:=TJpegImage.Create;
try
if m_blob.Size<>0 then
begin
try
m_jpeg.LoadFromStream(m_blob);
image.Picture.Assign(m_jpeg);
except
showmessage('主表中图片格式无效(JPG格式),请重新扫描或读入.');
end;
end
finally
m_jpeg.Free;
m_blob.Free;
end;
end;
var
m_blob:TBlobStream;
m_jpeg:TJpegImage;
begin
image.Picture:= nil;
m_blob:=TBlobStream.Create(TBlobField(table.FieldByName('照片')),bmRead);
m_jpeg:=TJpegImage.Create;
try
if m_blob.Size<>0 then
begin
try
m_jpeg.LoadFromStream(m_blob);
image.Picture.Assign(m_jpeg);
except
showmessage('主表中图片格式无效(JPG格式),请重新扫描或读入.');
end;
end
finally
m_jpeg.Free;
m_blob.Free;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货