?
Solved

Invalid BLOB handle in record buffer

Posted on 2003-02-24
8
Medium Priority
?
7,592 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

770 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