Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ORA-01704: String Literal Too Long

 
Alok Sharan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Because of some constraint I need to save the file content upto 5MB into database. My file upload functionality is working perfectly fine for data <= 4000 chars, but failing beyond that. The error it is reporting is ORA-01704. I googled the issue and found this as a problem with oracle itself. Can somebody suggest me the workaround to this? I am not sure how binding will work in this. I tried some binding concept but there again I found chars limit upto apprx 33000.

I am using CLOB as my column to keep the data.

I have to use Oracle 10g in my project.

currently I am using
java.sql.PreparedStatement.
setCharacterStream(int parameterIndex,
Reader reader,
int length);
method to save the file data into database.

Any suggestion/pointer will be apppriciable.

Thanks,
Al
 
Campbell Ritchie
Marshal
Posts: 53135
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check the JavaRanch naming policy and adjust your display name to conform.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!