Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

No ResultSet was produced

843854Oct 24 2003 — edited Oct 24 2003
Hello,

I'm getting this java.sql.SQLException: No ResultSet was produced.
I use J2SE 1.4.1, Jakarta Tomcat, Sybase ASE ODBC driver, Windows 2000. The code makes use of a CollableStatement to execute a stored procedure on Sybase, similar to the following:
    CallableStatement cs = connection.prepareCall( 
      "{call sp(?,?)}" );
    cs.setInt( 1, intvalue );
    cs.setString( 2, stringvalue );
    ResultSet rs = cs.executeQuery();
    return rs;
I tried with
cs.execute(); return cs.getResultSet();
in which case the ResultSet returned is null. The stored procedure is supposed to return a result set and nothing else. If I execute the sp for the same particular instance, it does actually also return a few records in the result set, so I'm really puzzle to what the cause might be. The db driver? Using too many CallableStatementS and ResultSetS at the same time? Any small suggestion on this is very much appreciated.

Thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2003
Added on Oct 24 2003
5 comments
492 views