aspose file tools*
The moose likes JDBC and the fly likes Facing Big Problem with Sql Server 2000 Odbc Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Facing Big Problem with Sql Server 2000 Odbc Driver" Watch "Facing Big Problem with Sql Server 2000 Odbc Driver" New topic
Author

Facing Big Problem with Sql Server 2000 Odbc Driver

Rajesh Kumar77
Greenhorn

Joined: Sep 04, 2001
Posts: 12
Hai,
I am facing a lot of problems with sql server 2000 odbc drivers.
and the database
when i try a awt database application in ms access it is working perceftly
but is it not working in using sql server 2000 database
and some times i am getting the exception with sql server
java.sql.SQLException : [Microsoft] [ODBC SQL Server Driver] Connection is busy with results for another hstmt.

pl give me some solution to my problem
i am facing pblm from past 2 weeks
pl give me replies
Thankyou
Yours
Raj
Ramesh Kumar Swarnkar
Ranch Hand

Joined: Sep 15, 2003
Posts: 84
Well Raj, the major scenario to appear such case is due to nested Statement.
[ as you may be working on multile tables ].
To make it more clear ; check whether your are using such a case:-

java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc dbc SNNSNAME", "user", "pwd");
java.sql.Statement statement = conn.createStatement();

java.sql.ResultSet RS = statement.executeQuery(Query);

while(RS.next())
{
--------
try
{

java.sql.Connection conn1 = java.sql.DriverManager.getConnection("jdbc dbc SNNSNAME", "user", "pwd");
java.sql.Statement statement1 = conn1.createStatement();
----------
-----------


Notice here conn1 .If by mistake you make it conn. you may fall into above error zone.This is one case we mostly commit mistake.

Ramesh Kumar Swarnkar

[ August 25, 2004: Message edited by: Ramesh Kumar Swarnkar ]
[ August 25, 2004: Message edited by: Ramesh Kumar Swarnkar ]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

and: odbc drivers are out.
Use a jdbc-driver like jTDS.


http://home.arcor.de/hirnstrom/bewerbung
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30753
    
156

Ramesh,
Note that the original post was from 3 years ago. The poster probably doesn't still need an answer.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

But if he's waiting for 3 years for an answer, we shouldn't let him wait 3 additional years, should we?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Facing Big Problem with Sql Server 2000 Odbc Driver