I have a mysql database table of the following schema,
CREATE TABLE IF NOT EXISTS `feresys`.`faces` (
`face_id` INT(11) NOT NULL AUTO_INCREMENT ,
`local_hist` INT(11) NULL DEFAULT NULL ,
`user_id` VARCHAR(45) NOT NULL ,
PRIMARY KEY (`face_id`) ,
UNIQUE INDEX `user_id_UNIQUE` (`user_id` ASC) )
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
I want to insert the following data into the table
id size 1x4 ( eg. '1001')
local_hist size 1x64x256 which is a cell array containing gray_scale histogram of 64 regions of an image, which are all integers 0-255.
I've used the following lines to perform the insertion:
conn = database('dbname', '', '', 'com.mysql.jdbc.Driver', 'jdbc:mysql://localhost:3306/dbname');
extdata = {LH, id};
colnames = {'local_hist', 'user_id'};
tblname = 'tbname';
fastinsert(conn, tblname, colnames, extdata);
But i get the following error message:
?? No method 'setInt' with matching signature found for class
'com.mysql.jdbc.JDBC4PreparedStatement'.
Error in ==> database.fastinsert at 181
StatementObject.setInt(j,tmp) %INTEGER
Can anybody please help me how to solve this problem?
Thanks in advance.
So the change is:
exdata = {id, cell2mat(LH)}; % 64x256 to 1x16384
and local_hist BLOB
Ref:
http://www.mathworks.com/support/solutions/en/data/1-1BYF0/index.html?product=DB&solution=1-1BYF0
http://www.mathworks.com/matlabcentral/newsreader/view_thread/286206
"Iqbal Nouyed" <iqbal...@gmail.com> wrote in message <ighjec$2if$1...@fred.mathworks.com>...