Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

using jdbc to connect to MSSQL SERVER

Posted on 1997-05-07
1
Medium Priority
?
212 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 300 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
This video teaches viewers about errors in exception handling.
Suggested Courses

824 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