如题所述
解决方案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
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
温馨提示:答案为网友推荐,仅供参考