?
Solved

Invalid BLOB handle in record buffer

Posted on 2003-02-24
8
Medium Priority
?
7,906 Views
Last Modified: 2008-09-18
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
0
Comment
Question by:wipnav
7 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8010529
hmm,

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

just as suggestion if possible

meikl ;-)
0
 
LVL 2

Expert Comment

by:CSJ
ID: 8041620
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
0
 
LVL 1

Accepted Solution

by:
grolschisgood earned 800 total points
ID: 8217156
For BDE

to get around this problem i have always set the BLOBS TO CACHE option for my BDE alias to -1.  This is done in the BDE administrator either for the particular alias under the Databases tab, or for all newly defined aliases by changing it in the configuration tab.

Im not sure whether -1 actually disables caching of blobs or sets it to the maximum 65536, however my understanding was that it disabled caching.

k
cam
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Expert Comment

by:agnescabrera
ID: 9184767
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?    
0
 

Expert Comment

by:agnescabrera
ID: 9197654
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?  
0
 

Expert Comment

by:agnescabrera
ID: 9244427
The problem got solved by setting the BLOBS TO CACHE to -1, not in the BDE but within the program.  
0
 
LVL 10

Expert Comment

by:kacor
ID: 9956443
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
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question