Solved

"Invalid BLOB handle" problem

Posted on 1997-09-03
3
665 Views
Last Modified: 2012-06-21
I am inquiring to find out more about this error and what is causing it. I'm using Delphi 2 with BDE v3.5 under SQL Server and Windows NT. Here is the line of code which generates the exception:

  ablobstream := TBlobStream.Create(ablobfield,bmRead);

The error message generated is:
 "Invalid BLOB handle in record buffer"

I've done a lot of searching on this particular error. Many people seem to get it, but no one has really replied to say what's causing it, or how to fix it.

Any help/information would be appreciated.
0
Comment
Question by:csean
  • 2
3 Comments
 
LVL 1

Expert Comment

by:arh
ID: 1343572
 This seems to be a bug in BDE. I encountered it when i tried
to display memo field contents in a grid connected to a query.
(server is Oracle).
I found that it occurs only if TQuery.RequestLive property is
set to false, and when you scroll several pages down and one page up. Setting RequestLive to true eliminates this error,
but also significally slows scrolling through data set.
  I tried to use direct  BDE API calls to read blob data, but it did not help (so the problem is not in TBlobStream).
  I don't know how this bug affect data sets which are tables (not queries) because I don't use TTable at all.
  Have anyone tried to submit this as a bug report to Borland?
(they say you can do it at www.borland.com)
0
 
LVL 1

Accepted Solution

by:
arh earned 70 total points
ID: 1343573
I have found and (incomplete) answer on Borland web page.
It appears that for non-live cursors the number of accessed BLOBS is limited by BDE cache size, which can be adjusted in BDE 4.0.
Here is Borland answer:

Q: "Invalid BLOb handle" error: What is the cause and how do I fix this error?

A: If the error occurs on a non-live (dead, canned) query or a table with no indexes, then increasing the new BDE4.0 configuration parameter 'BLOBS TO CACHE' will fix the problem. This setting determines how many BLObs will be cached on the client. Applications that deal with fetching dead BLObs using dead table opens or queries can set a limit on the number of BLObs to cache depending on the resource available on the client. Setting a value 100 means the application can work with a maximum of 100 BLOb records cached. Fetching more than 100, then scrolling back 100 records results in an "Invalid BLOb handle in record buffer" error message.
NOTE: This parameter does not apply to live table opens.
0
 

Author Comment

by:csean
ID: 1343574
Thanks arh,

Your proposed answer fixed the problem we were having. Although
we did have to increase the value to 5000 because there was
nearly that many records in the result set.


0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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