Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compare Values JTextField against a field in a MySQL Database

 
Declan Dee
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gents,

Does anyone out there please provide some help or a link to where I can find a way to compare an integer that I have typed into a JTextfield against a field in a MySQL database?

For example if I type 4 into the textbox, I can compare this value to the database field and take action accordingly

I can find absolutly nothing on the net about this.

Any help or links is greatly appreciated.

I need to do the same for strings as well. I just need some links/examples to get me started

Declan

 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's two steps.

(1) Get the number from the JTextField.

(2) Compare it to the database field.

Are you having trouble with both of those?
 
Declan Dee
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

I am sure I can get the value of the textField but using the getText method, I am ok there.

Is the compare part that I am not sure about

Declan D
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic