0

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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I my case s would be many arrays that must persist until form close. Apparently I will need to loop through and free every single element of the array of (graphic) blobs as the array variable does not have a a free method. Is there a faster way of doing that?
I don't know if there is a faster way.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.