This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with insert and select

 
Sunil Tiwari
Ranch Hand
Posts: 49
Clojure Redhat Spring
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the issue resolved, Antony ?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic