如何判断sql库中image型字段为空

如题所述

解决方案1:
if not (query1.FieldByName('字段') as TBlobField).IsNull then begin
end;

解决方案2:
var
B:TBlobStream;
MJpg:TJpegImage;
begin
B:=TBlobStream.create(query1.FieldbyName('Blobfield') as TBlobfield,bmRead);
MJpg:=TJpegImage.create;
try
if B.size>0 then begin
MJpg.LoadFromStream(B);
Image1.Picture.assign(MJpg);
end;
finally
B.Free;
MJpg.Free;
end;
end;
end;

解决方案3:
IsBlob
或者SaveToFile ,SaveToStream

解决方案4:
if FindField('').value = null

解决方案5:
关注

解决方案6:
sql 语句用 IsEmpty
Delphi 用 IsNull

解决方案7:
sql语句:
where field is not null
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网