Solved

using jdbc to connect to MSSQL SERVER

Posted on 1997-05-07
1
203 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
why cannot we forward request once the response is committed 2 46
runtime exception 2 42
pagenation logic how it is working in my code 1 56
Bot application - advice 3 38
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

831 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