MATLAB: Do I receive an error when I try to update an image datatype in a Microsoft SQL Server database using the Database Toolbox

databaseDatabase Toolboxdatatypeerrorhorzcatimagemicrosoftserversqltoolboxupdate

I receive the following error when I try to update an image datatype in a Microsoft SQL Server database:
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.
Error in ==> database.update at 149
tmpstr = ['''' tmp ''''];

Best Answer

This enhancement has been incorporated in Release 2011b (R2011b). For previous product releases, read below for any possible workarounds:
This error occurs when image data passed to the UPDATE function is a n x 1 int8 matrix. The image datatype expects binary array data.
To work around this issue, pass a 1 x n int8 array to the image datatype, as shown in the following example:
data2 = data';
where data is a n x 1 int8 matrix.
Related Question