File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes null value to database table from JForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "null value to database table from JForm" Watch "null value to database table from JForm" New topic
Author

null value to database table from JForm

Gokcen Guner
Greenhorn

Joined: May 23, 2009
Posts: 9
Im working on a project similar to custom database app tutorial of NetBeans (http://www.netbeans.org/kb/docs/java/gui-db-custom.html)

When I try to add new record to detail table i get he error:



There are a lot of errors too, but that may be enough. If not i can post it too.
I've just followed the instructions in the tutorial to trace the problem and they are all the same. I couldn't find the problem.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19784
    
  20

Gokcen Guner wrote:Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'offense' cannot be null

Apparently, in your database table, you've specified that column "offense" cannot have any null values.

Moving to JDBC.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Gokcen Guner
Greenhorn

Joined: May 23, 2009
Posts: 9
thanks for reply. Eventually Ive found why the data didnt go to database from JForm.
himanshu rai
Greenhorn

Joined: Jun 22, 2011
Posts: 12
@Gokcen Guner
Im having the same problem, how did solve it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: null value to database table from JForm