Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Interbase, cached updates and Blob not found error


My application is querying an Interbase table that contains blob fields and I am using cached updates. I can do some editing of the blob fields but after editing a few records I begin to get the error 'BLOB NOT FOUND'. Why am I getting this error and what can I do to avoid it?   

    This issues arises because of the way that Interbase accesses blob fields. Interbase Blob handles are not guaranteed to stay consistent across transactions and therefore the record buffer that is cached may contain a Blob handle that is no longer valid (BLOB NOT FOUND). There are a few workarounds you can try:

    . Use a live query instead of cached updates 2. Use a TTable instead of cached updates 3. Use MIDAS 4. Refresh the query after each post (not recommended--too expensive) 5. Force an update of all blob fields when posting:

    Example of #5:

    TForm .Query BeforePost(DataSet: TDataSet); var i: Integer; temp: String; begin for i := 0 to Query .FieldCount- do if (Query .Fields[i].IsBlob) then begin temp := Query .Fields[i].AsString; Query .Fields[i].AsString := temp; end; end;

    This will force an update of all blob fields and refresh their handles. 3/26/99 :00:00 AM

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use