JAVA SQL how to save the image data file

In a mobile phone picture will be saved into SQL database, how to solve, the following method suggests a strange error:

PreparedStatement statement;
//ImageFile mobile phone in the picture file, path:/mnt/sdcard/1385971283971.jpg
File file = new File(ImageFile);
FileInputStream inputStream = new FileInputStream(file);
String sql = "insert into t_s_busqm(FKeyID,FBKeyID,FPic,FDoTime,FDoUser) values(?,?,?,?,?)";
statement = conn.prepareStatement(sql);
statement.setString(1, "1");
statement.setString(2, "2");
statement.setBinaryStream(3, inputStream, (int)file.length());
statement.setString(4, "3");
statement.setString(5, "4");
} catch (SQLException e1)
} catch (FileNotFoundException e1)

Here is how to save... Error for:

Java.sql.SQLException: first: there is a syntax error near'max'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(
at org.omagic.GetDataValue.SaveBmpToDB(
at org.omagic.curcustomer$7$1.refreshActivity(
at org.omagic.WritePadDialog$2.onClick(
at android.view.View.performClick(
at android.view.View$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(
at dalvik.system.NativeStart.main(Native Method)

Or if single hand into the FPIC field, the same can not. If not in this field, you can... For the master!!!!!!!!!!

Note: the database is SQL 2000, field type for FPic: image

Started by Beatrice at February 12, 2016 - 9:39 PM

Master ah?...

Posted by Beatrice at December 09, 2016 - 5:29 PM

How come no one to master please come out?. . . . . . .

Posted by Beatrice at December 22, 2016 - 6:24 PM

Master? Where are ah....

Posted by Beatrice at December 31, 2016 - 7:11 PM

Memory address, why the binary deposit.

Posted by Maureen at January 02, 2017 - 8:25 PM

I have to save to the server up, is not stored on the mobile phone, so be sure to save the file in the past. .

Posted by Beatrice at January 03, 2017 - 9:05 PM

Strange, this is to shut down? Or master in bed?

Posted by Beatrice at January 15, 2017 - 7:43 PM