Hi, 2 issues with TDBImage:
First, TDBImage does not handle the case of a NULL blob very well. When a blob field is NULL, CreateBlobStream can return Nil. The Nil case is not handled correctly by TDBImage. I submitted a bug report (10711) with a patch attached, please commit it. Secondly: In general, the TDBImage should be more flexible about the kind of data it expects: it now requires that the first part of the blob stream is an ansistring with the extension of the image. This is of course not true unless the image was saved by TDBImage itself, but is not correct for other, legacy, data. For instance, the Borland TDataset writes a TGraphicHeader record to the stream before the actual image data (guess how I found out). I think that this can be easily fixed by adding an event handler 'OnGetImageFormat' to TDBImage, which, if set, should return this ansistring; if it is not set, the current behaviour remains. Similarly, an 'OnSetImageFormat' will write the type to the stream (if a write is needed at all). I think this is a simple change, and if the Lazarus devels agree, I can create a patch for it. Michael. _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives