• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PreparedStatement.toString()

 
Vasu Yelisetty
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does any one know the max length of the string oracle thin driver can accept? I am getting following exception..
java.sql.SQLException: Data size bigger than max size for this type: 13001
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at java.sql.SQLException.<init>(SQLException.java:43)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java)
at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java)
at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java)
Thanks
Vasu
------------------
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This could be your problem: http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#_36_
Why am I not able insert >2K data into a long column with setString using 8.0.X THIN driver?
Basically, our 8.0.X THIN DRIVER has Oracle 7 Properties, and hence you cannot use setString to insert >2000 byte data into a long column. Long columns with >2K data needs to be streamed and you cannot stream with setString.
check your jdbc driver docs for the max size if you are using a higher database version than 8.0.X
If setString() wasn't the offending code that threw the exception you'll have to expand on how this error message was produced.
Jamie
 
Vasudevan Gopalan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show me the sample code

Vasu
 
Jason Cox
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also check the max size for the column you are trying to insert into. Although it's been awhile, I believe the last time I saw an error message like that was when I was trying to put more characters into the database than the column was set for. (ex: putting 256 characters in a column set for 255)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic