0

Forgive me if this question is very vague

Some time back i faced this issue.

I used java and wrote a prepared statement INSERT into a table that had a few CLOBS. I inserted the records in the same order of the columns and got a SQL exception. The question is about this exception only.. I completely forgot what this exception is about

When i googled about the exception, the solution said CLOB's must always be inserted at the end and not somewhere in the middle even though the column occurs somewhere in the middle of the table.

I did that and the issue vanished. Now does any expert know which exception i am talking about? Please forgive me if i am not giving enough information. This is what I have

2
  • If you know how to reproduce the problem, can you not just write some code that does so? Commented Nov 30, 2011 at 14:46
  • It doesnt happen always. It happened suddenly. If it fails always I can definitely reproduce. Now there is no guarantee Commented Nov 30, 2011 at 14:48

2 Answers 2

1

Whether you should insert blobs at the end will depend on your database and the driver. To be honest, I would consider it a bug in the driver if it required the users to handle this implementation detail of the database, instead of the driver taking care of it.

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

Comments

0

To the benefit of everyone. This is the error for which my solution is outlined in my question.

, "Expanded non LONG bind data supplied after actual LONG or LOB column" // *Cause: A Bind value of length potentially > 4000 bytes follows binding for // LOB or LONG. // *Action: Re-order the binds so that the LONG bind or LOB binds are all // at the end of the bind list.

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.