Unix Technical Forum

Connection is busy with results for another hstmt

This is a discussion on Connection is busy with results for another hstmt within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> I have my java based application that works fine with SQL server 6.5. I upgraded DB to SQL Server ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:14 PM
Athar
 
Posts: n/a
Default Connection is busy with results for another hstmt

I have my java based application that works fine with SQL
server 6.5.

I upgraded DB to SQL Server 2000 and now the application
give me "Connection is busy with results for another
hstmt " ODBC error after I do couple of queries or updates
through the application.

Is it anything to do with ODBC drivers or I have to change
setup of SQL Server?

Thank you
Athar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:15 PM
Brannon Jones
 
Posts: n/a
Default Re: Connection is busy with results for another hstmt

SQL Server only supports a single active statement per connection. Are you
using the MS JDBC driver to access SQL Server?

If you aren't actually trying to use multiple statements per connection,
then you might be able to workaround the error by making sure the statement
is closed before using another one. I'm not familiar with the JDBC
interface, but in ODBC, you'd call SQLMoreResults() until it returned
SQL_NO_DATA to make sure you've processed all of the results on the wire.
In ADO.NET you will get the same error if you haven't called Close() or
Dispose() on the SqlDataReader before trying to Execute another SqlCommand
on the same SqlConnection.

If you are trying to use multiple statements per connection (at the same
time), then you need to use multiple connections instead.

SQL Server 2005 has a new feature called MARS (Multiple Active Result Sets)
which will allow multiple statements per connection.

Brannon

"Athar" <aikram@celestica.com> wrote in message
news:185a01c47bdf$ee142e80$a601280a@phx.gbl...
> I have my java based application that works fine with SQL
> server 6.5.
>
> I upgraded DB to SQL Server 2000 and now the application
> give me "Connection is busy with results for another
> hstmt " ODBC error after I do couple of queries or updates
> through the application.
>
> Is it anything to do with ODBC drivers or I have to change
> setup of SQL Server?
>
> Thank you
> Athar


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com