• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Facing Big Problem with Sql Server 2000 Odbc Driver

 
Rajesh Kumar77
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and: odbc drivers are out.
Use a jdbc-driver like jTDS.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramesh,
Note that the original post was from 3 years ago. The poster probably doesn't still need an answer.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But if he's waiting for 3 years for an answer, we shouldn't let him wait 3 additional years, should we?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic