The moose likes JDBC and Relational Databases and the fly likes null resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "null resultset" Watch "null resultset" New topic

null resultset

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
I am calling a stored procedure from a java program as follows:

When I run the Stored procedure, i get one record. The outparam in the above code also returns "SuCCESS". However, rs = st.getResultSet(), returns null.

What could be the reason? The same code, at exactly in a different method works perfectly fine.

Please assist.

SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
venkat vanukuri

Joined: Mar 12, 2005
Posts: 3

I guess one uses Result set to deal with objects returned. for example Oracle data type CURSOR.
In your case i see no reason to use result set.

I might be wrong.

Hope it helps

Venky<br />SCJP 1.4,IBM 285
venkat vanukuri

Joined: Mar 12, 2005
Posts: 3
one more suggestion if you have to use Result Set,
try using rs = st.execute(); rather than boolean b = st.execute();.

Hope it helps.

I agree. Here's the link:
subject: null resultset
It's not a secret anymore!