to verify a resultset

Hi,

I want to know if a query is yielding a resultset. Say for example

rs = stmt.executeQuery("Select first_name, last_name , home_branch, full_time, reg_schedule_hrs , part_time from employee_details where employee_id = '"+emp_id+"' ");

I want to know how to code if it doesn't return records so that I can mention it in the output page. Can i use something like

if (!rs.next()) or if (rs == null) ? I am not sure and i would appreciate any assistance.

[503 byte] By [vishvesh_obla] at [2007-9-26 2:00:58]
# 1
you can use if(!rs.next())
tulip_ye at 2007-6-29 8:40:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...