This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes On SQL Error 407 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "On SQL Error 407" Watch "On SQL Error 407" New topic
Author

On SQL Error 407

Deena Raj
Greenhorn

Joined: Mar 01, 2007
Posts: 7
I am getting SQLException with error code 407 when trying to insert value to a table. I do not know the values in the insert query (it is in the production environment) so I cant figure out value which is null. The exception trace is : DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=9, TABLEID=5, COLNO=24. From this statement can i find out the column which is causing the issue (the column which is null). Does COLNO=24 indicate that the 24th column in the insert query was null?
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

In general, this error does indeed indicate that column #24 was null, but needs a value.
It can also be caused by a known program error.
Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: On SQL Error 407
 
Similar Threads
SQL Error!!
Hibernate mapping no good?
Hibernate: Default Binding of database field
problem with SQL query....
insert data into 2 tables using HQL