Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inserting two values using setCharacterStream in a single query

 
chris
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all...

i have a query inserting two - 4000bytes coulmns on user request..
for more than 2000bytes values, i used pstmt.setCharacterStream like this..

pstmt = con.prepareStatement(sql);
pstmt.setString( 1, "aaa" );
pstmt.setString( 2, "bbb" );
pstmt.setCharacterStream( 3, new StringReader( strCCC), strCCC.length() );
pstmt.setCharacterStream( 4, new StringReader( strDDD ), strDDD .length() );

when i using only one setCharacterStream in a query, it works fine.
but i try to user two setCharacterStream in a query, it thows exception :

java.sql.SQLException: ORA-01401: inserted value too large for column


Can't I use two setCharacterStream in one statement???
please help~
 
wu xiaoxu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i meet the problem too! is anybody could help
 
Perumal Kasi
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your table structure?
Also can you mention the database you are using?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic