Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC error message

1 view
Skip to first unread message

SHIVAKUMAR GOVINDARAJAPURAM

unread,
May 4, 1997, 3:00:00 AM5/4/97
to
Mailbox

Joe Weinstein

unread,
May 5, 1997, 3:00:00 AM5/5/97
to SHIVAKUMAR GOVINDARAJAPURAM

SHIVAKUMAR GOVINDARAJAPURAM wrote:
>
> Hi,
>
> I am developing an application using jdbc-odbc driver which talks to the MS SQL Server(Database).
>
> The following statement - SELECT * FROM TABLENAME
>
> works fine sometimes and doesn't work sometime from the application.
>
> The following is the error message displayed
>
> java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Connection is busy wit
> h results for another hstmt
> at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3669)
> at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3822)
> at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:1063)
> at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:214)
> at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:1
> 39)
>
> I would appreciate an early response to the above problem.
>
> Thanks
> Padma

The issue is that the DBMS sends all the results from a query
at once, and the client needs to pull all the results off the
wire before it can ask for any more/different data. If one of
your previous queries didn't fetch enough data for the driver
to take all the results off the wire yet, and you try to execute
another query, this will happen. The only workaround is to
write queries that only return desired data, get through the
data asap, and don't try to use the same DBMS connection in
different threads...
Joe

--
Joe Weinstein j...@weblogic.com WebLogic Inc. 417 Montgomery
www.weblogic.com SF, Ca. 94104 1-415-659-2600
If trees could scream, would we be so cavalier about cutting them down?
We might, if they screamed all the time for no good reason. Jack Handey

root

unread,
May 9, 1997, 3:00:00 AM5/9/97
to

I've gotten this message by doing executeQuery(), then getXXX() on the
ResultSet without doing the required next() first.

Ricardo

rgu...@cybernex.net
-----------------------------------------------------------

0 new messages