I am having a problem with PreparedStatement.setBinaryStream(1,x,y), it works for files with smaller size but for a file of 15 Mb the file downloads easily but while uploading it returns -1 in statement.executeUpdate(). I looked over many places in google and found that PreparedStatement.setBytes worked for some but it didn't for me and now i am just repeating every methods found in forums but am stuck at the same point , so plzzzzz help me with this.
I don't have the access to production server database so i don't know about the driver implementation and SQL Server compatibility mode but i can request for those things .... what can i do after getting those parameters...
You don't need access to the DB for either. You can query for compatability mode via Entirprise Manager and you will have the driver in your classpath.
The image data type will hold 2GB of data, so its not likely to be the database. Sounds like a driver issue perhaps.
Thank you Paul for helping me but i don't have the exact information about the production server database and have requested those and so i can't figure out what to do unless i get the details of the database and the constraints of the column. Thank you again.
You are welcome. Are aware you can get the information you need by querying the database? exec sp_help on the table in question will tell you all you need to know about the table and column. exec sp_dbcmptlevel will tell you the compatability level (though reading the docs this probably does not matter in your case, image has always supported 2GB).