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!

ResultSet.next() throws an SQLException when over 100 records returned

843854Oct 24 2002 — edited Nov 6 2002
I have a stored procedure that returns a cursor defined in Oracle.

In my java code that calls the stored procedure, I do the following:

try {

CallableStatement cstmt = conn.prepareCall ("? = CALL ACTS_ERN.QR_ACTRefCurDS (?, ?) ;
ResultSet cursor = null;

cstmt.registerOutParameter(1, java.sql.Types.OTHER);
cstmt.setString(2, clientCode);
cstmt.setInt(3, empId);

cstmt.execute();

cursor = (ResultSet)cstmt.getObject(1);
while(cursor.next()){
....
}
} catch (SQLException e) {
e.printStackTrace();
}

What happens now is that when the returned ResultSet has less than 100 rows, it works fine. As soon as the data returned exceeds 100 rows, it throws an SQLException : ORA-24347 Warning of a NULL column in an aggregate function at "cursor.next()". I wanted to use cursor.getFetchSize() to find out how many rows was returned and I got another exception saying "JDBC2.0 method not implemeted". I am using weblogic JDriver. I don't know how I can get away with either error.

What I don't know is if I am getting the cursor object back wrong or what. I know that if it's an SQL statement that returns columns in tables, it'd work for more than 100 rows for sure...

Please help!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2002
Added on Oct 24 2002
7 comments
310 views