Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

inserted value too large for column

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting 'inserted value too large for column' error but how can I tell which column is causing the problem? Can I know that information from SQLException object?
[ December 22, 2004: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how are you getting this "inserted value too large for the column".
are you doing sqlException.printStackTrace()?
 
satish kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes...I've included output of sqlExcp.printStackTrace() too

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

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:878)
at acrostics.TestOracle.<init>(TestOracle.java:34)
at acrostics.TestOracle.main(TestOracle.java:64)
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satish,


how can I tell which column is causing the problem


As far as I know, you can't.
[Note: You may be able to in Oracle 10g, but I'm still on Oracle 9i.]
You just have to check the SQL statement that you are sending to the
database.

For example, if you are trying to enter the string "several" into a column
that is defined as VARCHAR2(5), you will get this error.

If it is difficult for you to check the SQL, then perhaps try "P6 Spy":

http://www.p6spy.com

Good Luck,
Avi.
 
satish kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out which column was causing the problem by looking at data dictionary and my SQL. I am a bit disappointed that system can't specify which column is too large. Is it driver limitation or database limitation?
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by satish kumar:
Is it driver limitation or database limitation?

I suspect it's the database. Issuing the same SQL in SQL*Plus results in the same message without the table/column. Luckily, when you violate a constraint it tells you its name!
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satish,

First of all try the same sql command in your oracle database
still it will give the same then you should check the limitations of your table, like datatype,indexing etc.
Thanx
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic