admin管理员组

文章数量:1289381

I am getting this error when exiting my application. I am using delphi 7 with ZEOSLIB 8, PostgreSQL database ver 16.

The Delphi statement I use for loading blobs from database into bitbutton blobs is as follows:

DBtns[DCounter].Glyph.LoadFromStream(
    Datamod.tblChargeCodesgraphic.DataSet.CreateBlobStream(
        Datamod.tblChargeCodesgraphic , bmread
    ).Create
);

The ZEOSLIB component method to read a blob from the the PostgreSQL database is createblobstream.

This line of code works perfectly, but how do I close the stream with a ZEOSLIB component method? I cannot find one, and ZConnect.CancelOperation does not work.

I am getting this error when exiting my application. I am using delphi 7 with ZEOSLIB 8, PostgreSQL database ver 16.

The Delphi statement I use for loading blobs from database into bitbutton blobs is as follows:

DBtns[DCounter].Glyph.LoadFromStream(
    Datamod.tblChargeCodesgraphic.DataSet.CreateBlobStream(
        Datamod.tblChargeCodesgraphic , bmread
    ).Create
);

The ZEOSLIB component method to read a blob from the the PostgreSQL database is createblobstream.

This line of code works perfectly, but how do I close the stream with a ZEOSLIB component method? I cannot find one, and ZConnect.CancelOperation does not work.

Share Improve this question edited Feb 20 at 7:09 Laurenz Albe 248k21 gold badges295 silver badges370 bronze badges asked Feb 20 at 5:45 Johan BreslerJohan Bresler 6,51811 gold badges59 silver badges78 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Make sure to Free the TStream: Assign the result of CreateBlobStream() to a variable s and make sure (with a try - finally block) to call s.Free when you are done reading.

本文标签: