• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PreparedStatement.toString()

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
------------------
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you show me the sample code

Vasu
 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic