Simple and Urgent: JDBC Question
Dear Friends,
If I use
Code:
query = "SELECT * FROM Officer WHERE OfficerID='" + OfficerID + "'";
rs = stmt.executeQuery(query);
to check whether the guy exists. IF not found, then I will return loginResult = 0.
But I am afriad of the undetermined result in rs. What's in rs if the OfficerID is not found? Is it null or "" or so? How should I write the following condition?
if ( ... )
loginResult = 0
else
loginResult = 1
How to return an array of values from a method
Dear Friends,
How can I return more than one value back to the caller please?
Suppose I have to return an array of string from a method?
Thanks