help me on this code please!!

dear brothers
i want some help on this code
i have java database, and this code search in the database forthe intered values
i want to check the input and reteive error message if the intered values not found ...
i will be glad if you give me some hint