Hi,
When i try to store the image, iam getting one exception like
java.sql.SQLException: ORA-01460: unimplemented or unreasonable conversion requested. In the table, i declared the image field as BLOB data type.
Herewith i have attached my code snippet. just go through this code and say me what is the problem. Iam working in windows - oracle client. but the oracle server in linux. Admin has set the NLS_LANG also. He set the NLS_LANG like AMERICAN_AMERICA.ALUTF8 -something. Database admin is telling that some content is missing in database. I dont know what the content is missing. What i need to check. i raised this question before, they informed, the problem is in database conversion. Could you help me please.
String filename = "d:/commercial.gif";
if (!filename.equals("")) {
PreparedStatement ps = con.prepareStatement("insert into picture (id,picture1) values (?,?)");
ps.setString(1, "imageId");
FileInputStream fis = new FileInputStream(filename);
ps.setBinaryStream(2, fis, fis.available());
ps.execute();
ps.close();
} else {
PreparedStatement ps = con.prepareStatement("insert into picture (id,picture1) values (?, empty_blob())");
ps.setString(1, "imageId");
ps.execute();
ps.close();
}
thanks