Delphi 存储过程 内存释放 [已关闭]

Delphi stored procedure Memory free [closed]

提问人:user22933548 提问时间:11/17/2023 最后编辑:Kromsteruser22933548 更新时间:11/18/2023 访问量:149

问:


编辑问题以包括所需的行为、特定问题或错误以及重现问题所需的最短代码。这将帮助其他人回答这个问题。

4天前关闭。

每次我想将图像保存到文件时,我都无法创建 TBlobField 并在代码的这一部分中释放它。

If not (Mainform.spGetCardPicture.FieldByName('photo').IsNull)
then
begin
    // I cannot creat BF here because show error pointer position.
    BF := Mainform.spGetCardPicture.FieldByName('photo') as TBlobField;
    BF.SaveToFile('c:\Export'+'\'+Mainform.ADOQuery_PictureTable.FieldByName(Field_name1).AsString+'.jpg');
    // I cannot free BF here because show error pointer position.
    Mainform.ADOQuery_PictureTable.Next;
end.
德尔福 存储器

评论

0赞 Remy Lebeau 11/17/2023
您应该使用而不是直接使用。TDataSet.CreateBlobStream()TBlobField

答: 暂无答案