Re: question about finding the size of a DB column

2022-02-05 Thread Mike Kaganski

Hi Dhiraj!

On 05.02.2022 17:04, Dhiraj Holden wrote:
I have started looking at this bug 
 about Base 
crashing with Firebird when using a form to insert an image that does 
not fit in a binary field. The proposed fix was to check in xref/core/ 
forms/source/component/ImageControl.cxx whether the image was bigger 
than the database column. In order to do this, I need to find the size 
of the image and the column. How should I proceed?


Maybe this form control should get an optional max size property, which 
could be set according to the underlying field size; then the code could 
check that in OImageControlModel::setFastPropertyValue_NoBroadcast (for 
PROPERTY_ID_IMAGE_URL and PROPERTY_ID_GRAPHIC).


--
Best regards,
Mike Kaganski


question about finding the size of a DB column

2022-02-05 Thread Dhiraj Holden
I have started looking at this bug
 about Base
crashing with Firebird when using a form to insert an image that does not
fit in a binary field. The proposed fix was to check in xref/core
/forms
/source
/component
/
ImageControl.cxx

(OImageControlControl::implInsertGraphics) whether the image was bigger
than the database column. In order to do this, I need to find the size of
the image and the column. How should I proceed?

Thanks,
Dhiraj