Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

issue with retriving data from database

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Marshal
Posts: 26517
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And would you like to tell us what that problem is?
 
kessy cruz
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)){
 
Ranch Hand
Posts: 375
1
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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??
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic