This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC ans Stored Procedures Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC ans Stored Procedures" Watch "JDBC ans Stored Procedures" New topic

JDBC ans Stored Procedures

Shashi Iyy

Joined: Jun 12, 2008
Posts: 18
Hi All,

I am using the following code :

public HashMap getSkillsList(String msId) throws Exception
Connection conn = null;
CallableStatement cs = null;
ResultSet rs = null;
HashMap skillsListMap = null;

String skill = null;
int i = 1;

skillsListMap = new HashMap();

conn = SkillsDBConnection.getConnection();
cs = conn.prepareCall("{call P_SKILL_ID (?,?)}",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);


rs = (ResultSet)cs.getObject(1);

while (
if ((null != rs.getString(1)) && (null != rs.getString(2)))
System.out.println("Skill Name : " + rs.getString(1));
System.out.println("Skill Id : " + rs.getString(2));

skill = rs.getString(1);
skill = skill + "~" + rs.getString(2);

System.out.println("Skill : " + skill);

skillsListMap.put("" + i, skill);
} catch(Exception e) {
} finally {
return skillsListMap;

I am unable to make the ResultSet scrollable.Can anyone help me in resolving the issue of making the resultset scrollable?A example would be much better.Thanks in advance.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: JDBC ans Stored Procedures
Similar Threads
Error in getting data from database
Calling Oracle Stored Procedure
context parameter
Error Retreiving a resultset from an oracle stored procedure
HashMap and the While Loop Story