Is is possible to know where the record exists in DataBase for a preticular condition with out using Result set object
For Ex:- iwant to check the userid in database so that i will check in database and using result set i will forward my logic .
Santhosh, you might want to get someone to help you to phrase that question a little more understandably.
I think what you're trying to do is the common case where you want to see if a user is defined in a database, but you do not actually want to retrieve any of the user data. The SQL version of that would be:
Or, if you're doing a login check:
These queries do return a result set, but it has only one row and one column, and its value is either 1 (user exists, password valid) or 0 (user does not exist, or password is invalid).
So, while you need a ResultSet, the logic isn't all that complicated and the overhead is pretty low:
This code won't execute - I've done some simplifications to illustrate the concept, but it's basically how you'd do something like that.
Customer surveys are for companies who didn't pay proper attention to begin with.