A CallableStatement can return one ResultSet object or multiple ResultSet objects.
public interface CallableStatement extends PreparedStatement
following is syntax to call procedure :-
CallableStatement cs=null; cs=conn.prepareCall("{call showName(?)}"); // Pass your procedure Name cs.setInt("userid_", userId); // Set run time parameter cs.execute(); ResultSet rs = cs.getResultSet(); while(rs.next){ System.out.println(rs.getString("Name")); // Name Column Name in Table }
Im thankful for the article post.Thanks Again. Fantastic.
ReplyDeletenet coure
net training