MySQL Forums
Forum List  »  Stored Procedures

Re: How to return null/empty resultset from SP??
Posted by: Ming Yeung
Date: December 12, 2005 07:28AM

The java code I have is... (very simple!!)

=================================

public ResultSet execProcedure(){
try{
rs = cs.executeQuery();
}catch(Exception exception){
exception.printStackTrace();
}
return rs;
}

=================================

DdManager DB = new DdManager();
DB.openConnection();
DB.prepareProcedure("{call adminCheckLogin(?,?)}");
DB.setString(1, username);
DB.setString(2, cryptedPassword);
ResultSet rs = DB.execProcedure();

if(rs.next()) {
...
} else ...
...

Thanks Pem!

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to return null/empty resultset from SP??
1975
December 12, 2005 07:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.