aspose file tools*
The moose likes JDBC and the fly likes issue with retriving data from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "issue with retriving data from database " Watch "issue with retriving data from database " New topic
Author

issue with retriving data from database

kessy cruz
Greenhorn

Joined: Dec 13, 2010
Posts: 29
Goodday, please this is part of my code, i'm having problem retriving data from my database. i have a textfield called editField where you have to input a codeId and click editBtn to retrive the data from the database, edit and click the update button call updateBtn to save back into the database. Thanks

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18159
    
    8

And would you like to tell us what that problem is?
kessy cruz
Greenhorn

Joined: Dec 13, 2010
Posts: 29
It shows: exception in "Thread-3" java.lang.NullPointerException
Com.mysql.jdbc.exception.jdbc.MYSQLSyntaxErrorExceptionHunknown column in where clause
And points τ̅☺ dis if(!data[0].equalsIgnoreCase(code)){
R. Jain
Ranch Hand

Joined: Aug 11, 2012
Posts: 367
    
    1

kessy cruz wrote:It shows: exception in "Thread-3" java.lang.NullPointerException
Com.mysql.jdbc.exception.jdbc.MYSQLSyntaxErrorExceptionHunknown column in where clause
And points τ̅☺ dis if(!data[0].equalsIgnoreCase(code)){


And would you also like to tell us where is your "data" ?? and Where is your Course Class??
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1106

is codeId a string or integer.
This woukld be a perfect time to rewrite to use prepared statements, here is a page that explains why
use prepared statements
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: issue with retriving data from database
 
Similar Threads
Help(Client Fails to read from Server)
Right click popup menu
JTable Problem with netbeans
retrieving database data to textarea