PDA

View Full Version : cDbImageContainer Clearing Bug [V2.6]



raveens
6-Dec-2017, 08:38 PM
Hi DAW,

If you're using FILESTREAM to read/write images data directly unto a table (BINARY) column, then the image does NOT clear when the DD does a Clear/Clear_All.

We traced the issue to an oversight in the parent class cImageContainer, more specifically in the "Set psImage" procedure.

Within the "Procedure Set psImage String sImage" there is a block of code as per:



Get pbLoadFromResource to bLoadFromResource
If (not (bLoadFromResource)) Begin
Get ppsImage to sPreviousImage
Get FindImage sImage to sImage
If (sPreviousImage = sImage) Begin
Procedure_Return
End
End


This is to be updated as follows:



Get pbLoadFromResource to bLoadFromResource
If (not (bLoadFromResource)) Begin
Get ppsImage to sPreviousImage
Get FindImage sImage to sImage
If (sPreviousImage <> '') Begin //@ RRS
If (sPreviousImage = sImage) Begin
Procedure_Return
End
End
End


The reason being that psImage is usually blank when using FILESTREAM to read/write image data.

Hopefully this fix will applied to the next revision.

Thanks.

Mike Cooper
15-Mar-2021, 06:06 PM
I'm also seeing something wierd here, but not able to put my finger on it. Sometimes a load a new file and the change will not show until I exit the program. Other times it works fine. I have implemented your change Raveen and so far the behavior has not returned, but will keep an eye on it.