4

I am using IBM RAD. I am executing following query.

Conn.prepareStatement("update UPLOAD set STATUS='Decrypted' WHERE PATH ='"+path+"'");

the datatype of PATH in DB2 is VARCHAR.

i am getting following error

SQLCODE=-401,SQLSTATE=42818,SQLERRMC==,

1
  • someone has edited your ques, I want to know if WHERE PATH ='"+path+"'" is what you entered, before edit it seemed something like : WHERE PATH =""+path+"" Commented Apr 11, 2013 at 9:02

1 Answer 1

3

The error message means that you are comparing different data type.

eg :

'12'=12

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

2 Comments

i am comparing string with varchar in db2.
Are you sure its a VARCHAR or a "LONG VARCHAR",The error can occur due "LONG VARCHAR".

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.