E
echolan
Unregistered / Unconfirmed
GUEST, unregistred user!
部分代码如下:
Open;
if RecordCount > 0 then
begin
First;
MS := tmemorystream.Create;
TmpJPG := TJpegImage.Create;
try
TBlobField(FieldbyName('Image')).savetoStream(MS);
MS.Position := 0;
TmpJPG.LoadFromStream(MS);
ImageField.Picture.Assign(TmpJPG);
finally
TmpJPG.Free;
MS.Free;
end;
end;
Close;
以上数据库‘IMAGE’字段为BLOB型,在访问本地数据库时,该代码能正常运行。当使用中心数据库时,当代码运行到TmpJPG.LoadFromStream(MS)时会出现JPEG ERROR #52的错误!
请问如何解决?
Open;
if RecordCount > 0 then
begin
First;
MS := tmemorystream.Create;
TmpJPG := TJpegImage.Create;
try
TBlobField(FieldbyName('Image')).savetoStream(MS);
MS.Position := 0;
TmpJPG.LoadFromStream(MS);
ImageField.Picture.Assign(TmpJPG);
finally
TmpJPG.Free;
MS.Free;
end;
end;
Close;
以上数据库‘IMAGE’字段为BLOB型,在访问本地数据库时,该代码能正常运行。当使用中心数据库时,当代码运行到TmpJPG.LoadFromStream(MS)时会出现JPEG ERROR #52的错误!
请问如何解决?