Re: [Sybase JDBC Driver]No ResultSet set was produced



Hi. Try this:

boolean resultSetNext = statement.execute(sql);
int update_count = -1;

while (true) {
if (isResultSet) {
ResultSet r = statement.getResultSet();
... // process result set
r.close();
}
else {
update_count = statement.getUpdateCount();
}
if (!isResultSet && update_count == -1) break; // done with loop
isResultSet = statement.getMoreResults();
}

If this works then the Sybase DBMS is returning some odd
unexpected update counts while processing the SUM function.
If this doesn't work then the DBMS is failing while doing the
sum, and the DBMS has been configured to not throw a
serious error for numerical overflows.
You might also try changing the SQL to:

select sum( convert( double precision, number) ) from tablename...

This way the DBMS will do a sum which won't overflow. You could
also choose some other very-large-capacity column type for the
conversion. If the number column type you have in the table isn't
big enough to also hold the sum, you'll fail with the original SQL.
That's probably the issue.

Joe Weinstein at BEA

.