使用Matlab在MySQL中存储图像矩阵

时间:2015-12-24 15:39:23

标签: mysql matlab jdbc

我正在尝试将图像矩阵保存到我的数据库中。按照here概述的内容,我遇到了以下错误:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

导致错误的代码是:

            insertionMatrix = reshape(orgMatrix, 1, []);
            hdl = conn.Handle;
            insert = ['insert into test (Name, Image) values (?, ?)'];
            stmtObj = hdl.prepareStatement(insert);
            stmtObj.setObject(1, Name);
            stmtObj.setObject(2, insertionMatrix);
            stmtObj.execute;

我尝试插入的数组是1x263169,我尝试插入的字段所涉及的列类型是longblob。该表的当前行格式是动态的。

0 个答案:

没有答案