Link to home
Start Free TrialLog in
Avatar of wipnav
wipnav

asked on

Invalid BLOB handle in record buffer

Hi,

I am using a TTable component in Delphi 7 to access a table that has BLOB fields. As I navigate around the table I get an invalid BLOB error. I understand why I get the error, the fact being that it caches the BLOB fields and when I go back too many records, the BLOB handle is invalid. I don't want to just increase the number of BLOBs that are cached.

My question is, how can I code my program so that as I move around it doesn't try and use a cached BLOB, but always loads a new BLOB? I was thinking that maybe I could use an event handler somehow to do this.

Regards,

Bill
Avatar of kretzschmar
kretzschmar
Flag of Germany image

hmm,

load your blob separatly in a second dataset in the aftersroll event of the primary (blobless) dataset

just as suggestion if possible

meikl ;-)
Avatar of CSJ
CSJ

Rather than using a TTable, consider using a TQuery and set RequestLive=True if possible.  Blobs to Cache BDE parameter is not used when using this method.

Hope this helps

Floyd
ASKER CERTIFIED SOLUTION
Avatar of grolschisgood
grolschisgood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Loading the blob on a second dataset worked.  However, the report did not print the blob although the preview displayed it.   How can this happen?    
I followed Meikl's solution on using another dataset for the blob.  At first it was working and then after more tests of saving records using two datasets, I encountered it again.  Any more ideas?  
The problem got solved by setting the BLOBS TO CACHE to -1, not in the BDE but within the program.  
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept grolschisgood's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer