wood burning stoves 2.0*
The moose likes JDBC and the fly likes Validation/DB query question 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 "Validation/DB query question" Watch "Validation/DB query question" New topic
Author

Validation/DB query question

Ricky Jay
Ranch Hand

Joined: Feb 12, 2010
Posts: 62
I'm trying to validate for duplicate entries. I'm wanting to make sure that the value is not already in the table.

Is there a way to just return a value from a table without putting it in a bean? Should I just do a count and then return the count value?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Moved to the JDBC forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ricky Jay
Ranch Hand

Joined: Feb 12, 2010
Posts: 62
Am I going the right direction with this??

Ricky Jay
Ranch Hand

Joined: Feb 12, 2010
Posts: 62
Replaced with these two lines of code.

 
jQuery in Action, 2nd edition
 
subject: Validation/DB query question
 
Similar Threads
Number of rows in a table?
Parallel Hint! Very cool!
JavaScript to HTML table assistance
toString
How to count duplicate entries in one column