Solved

using jdbc to connect to MSSQL SERVER

Posted on 1997-05-07
1
200 Views
Last Modified: 2012-06-21
 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

0
Comment
Question by:padma
1 Comment
 

Accepted Solution

by:
wcrosman earned 100 total points
ID: 1220221
The problem here is that you've initiated two SQL querries without
fully dealing with the results returned by the prior querry.  Either
use a loop to deal with the results or issue a db_canquery command
to kill the awaiting results.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now