Solved

using jdbc to connect to MSSQL SERVER

Posted on 1997-05-07
1
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

734 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