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):
Code:
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
End
End_Procedure
End_Object
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).
Last edited by Garret Mott; 3-Aug-2022 at 09:27 AM.
Garret
I don't like making plans for the day... 'cause then the word 'premeditated' gets thrown around in the courtroom...