This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Null Pointer Exception on Fectching values from Table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Null Pointer Exception on Fectching values from Table" Watch "Null Pointer Exception on Fectching values from Table" New topic
Author

Null Pointer Exception on Fectching values from Table

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 172
Hi Everyone,
I am getting NullPointer Exception on fetching values from the table. And sometimes if exception doesnt comes then result.next() gives "false" . Please guid me where i am going wrong... Thanks!!!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Which line is giving you the exception?

Also, when you run the query at the sql command line, does it return anything?

Finally, what is the value of "area" in the parameter?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 172

Hello Jeanne, Thanks for replying. Actually i got through this problem, It was coming because of my SILLIEST mistake. Sorry
 
Don't get me started about those stupid light bulbs.
 
subject: Null Pointer Exception on Fectching values from Table
 
Similar Threads
how can we delete data from database corresponding check box using html table on JSP Page.
getting null values from DB
struts 2: Stuck up with simple issue
bean not right
Another DefaultTableModel post