Sizing an Image column

Aug 8, 2010 at 12:19 AM


I am using nHydrate version and have a column called "Photo" and I set its Data Type to Image. I wanted to set its Length to max but it then defaults to 0.

When I run Verify it produces the error "The length of a column cannot be zero."

Should the Length be set to the 16bytes size of the Table pointer or what Length should I set it to so that any size photo can be stored?

I would prefer to use varbinary(max) but a third party UI component I am using is expecting to see an Image type.


Aug 8, 2010 at 5:59 PM

This is an UI anomaly that will be fixed in the next version. NText and Image have predefined lengths. Any value you define for the Length property is ignored. The UI will show "predefined" in the next version. For now just set the value to 1 so it will pass validation. As I said the value makes no difference since you cannot define a length for these data types.