From: Dayananda on
Hi all,

I am getting error "??? No constructor java.io.File with matching signature found

Error in ==> test4 at 34
File image = new File('C:/images/5.jpg');"

while i am trying to read a image from local directory ad putting into mysql table

i am using part of code to do insertion of image to table and getting error has i mentioned above

result = (exec(dbConn, 'insert into picture values(?,?)'));
setString(1,'11');
File image = new File('C:/images/5.jpg');
FileInputStream fis = new FileInputStream(image);
setBinaryStream(2,fis,image.length());
executeUpdate();

is there any solution to insert image into mysql table..please solve my problem.
Kindly help me friends ..its urgent...Help my mathworks

Regards
Dayananda P
From: Steven Lord on

"Dayananda " <dayanandap(a)gmail.com> wrote in message
news:i0f5u8$1q3$1(a)fred.mathworks.com...
> Hi all,
>
> I am getting error "??? No constructor java.io.File with matching
> signature found
>
> Error in ==> test4 at 34
> File image = new File('C:/images/5.jpg');"
>
> while i am trying to read a image from local directory ad putting into
> mysql table
>
> i am using part of code to do insertion of image to table and getting
> error has i mentioned above
>
> result = (exec(dbConn, 'insert into picture values(?,?)'));
> setString(1,'11');
> File image = new File('C:/images/5.jpg');
> FileInputStream fis = new FileInputStream(image);
> setBinaryStream(2,fis,image.length());
> executeUpdate();
>
> is there any solution to insert image into mysql table..please solve my
> problem.
> Kindly help me friends ..its urgent...Help my mathworks

The code you've posted looks more like C++ code than MATLAB code. You do
NOT instantiate variables using "new" in MATLAB like you did here.

If you're new to MATLAB or a bit rusty, I suggest you familiarize yourself
(or refresh your knowledge) by reviewing the Getting Started section of the
documentation. Open up the documentation for MATLAB by typing this command
at the MATLAB prompt:

doc matlab

then expand the MATLAB item in the left frame and work your way through the
Getting Started guide, executing each of the examples and making sure you
understand what they're doing.

After that, if this is indeed C++ code that you're trying to use to create a
MEX-file, I suggest you read through the section of the documentation that
deals with MEX-files. Open up the documentation for MATLAB as before, then
expand the MATLAB item in the left frame, then the User Guide item
underneath MATLAB, then the External Interfaces item under User Guide. Read
through the item that talks about C/C++ language MEX-files.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com