Results 1 to 6 of 6

Thread: cDbImageContainer won't display Image from DB

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Somewhere in Vermont, USA - unless I'm not

    Default cDbImageContainer won't display Image from DB

    Hi -

    Latest Version (3.2) with DF 20.1 (also latest) & MS SQL Server 2019.

    I have BMPs stored in a VarBinary(Max) column that are large (1024 x 768 - but I've also tried 1/2 that: 512 x 384). I can view the DB image in an external image viewer (product named "SQL Image Viewer"), but no matter what I've tried, I cannot get them to display in a cDbImageContainer. The object is basically copied from the demo (which displays its own images just fine - Amy Aller has a mischevious smile, BTW):

                Object oHLDExternalLeakChart is a cDbImageContainer
                    Entry_Item HLDImageData.vData
                    Set Server to oHLDImageData_DD
                    Set Location to 5 485
                    Set Size to 222 273
                    Set psToolTip to "Graph"
                    Set peImageStyle to ifOriginal
                    Set pcBackColor to (GetSysColor (clBtnFace iand $FFFFFF))
                    Procedure DrawHistogram
                        Handle hoImage
                        Get phoImage to hoImage
                        If (hoImage <> 0) Begin
                            Send DrawHistogram of oHistogramDialog hoImage
    The image is created on disk from the CJ Chart Control & is then saved to the DB & the disk file is then deleted. The initial BMP can be viewed NP as well as once it's in the DB (as I mentioned above). I'd prefer to save as a JPG, but the Chart Control seems to want to only save BMPs.

    The record in HLDImageData is definitely being found. Any ideas as to what I might try?

    Also - I copied the VarBinary column to a record in the Graphics Demo table (PersonPhoto) & the demo will not display it either.

    ETA: DR 8.1 RDS will not show the images either. The attached image shows an image in the SQL Image Viewer tool (last record, ID # 35 is what's displayed).

    Click image for larger version. 

Name:	HLDImage.JPG 
Views:	33 
Size:	112.8 KB 
ID:	15574
    Last edited by Garret Mott; 3-Aug-2022 at 09:27 AM.

    I don't like making plans for the day... 'cause then the word 'premeditated' gets thrown around in the courtroom...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts