0

I'm trying to update the picture what I inserted into the database. I tried with update statement. But it produces error ORA-00933: SQL command not properly ended.

What I tried is:

 StringBuilder sb=new StringBuilder(1024);
 sb.append("update ").append(uname).append("PROFILEPICTURE set PROFILEPICT=? where ID=1 for update");
 String query = sb.toString();
 PreparedStatement ps = con.prepareStatement(query);
 ps.setBinaryStream(1, is);

I don't know how to update the BLOB content please anyone tell me how to update the BLOB column... Thanks...

1 Answer 1

2

You cannot issue an SQL statement "update ... for update". Just remove the trailing " for update" and your statement may work.

Since you don't tell us the content of uname, there may of course be other problems with your statement as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.