File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with insert and select

 
Sunil Tiwari
Ranch Hand
Posts: 49
Clojure Redhat Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in that case, can you send one more event after add to do search, so it will execute and give you the latest details on the screen
 
Scott Cook
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anthony,
Look at the error message:
java.lang.NullPointerException
at desktopapplication1.Datab.getColumnCount(Datab.java:48)

Your NPE is comming from line 48 (shows as line 3 below).



rsmd is null because your query was an update, not an execute. So, as others have said, this comes down to a design issue, not a database issue.
You have to make your code behave differently based on whether it's an update or execute.

Also, you definitely want to remove the quotes from around "null" on your INSERT statement in order for SQL to understand it correctly. That's not what's causing the NullPointerException.
 
Sunil Tiwari
Ranch Hand
Posts: 49
Clojure Redhat Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the issue resolved, Antony ?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic