|
-
Oct 29th, 2002, 06:12 AM
#1
Thread Starter
Hyperactive Member
Connection is busy with results for another command
Hi
Has any one had this error? I have a program that updates a SQL database. It works fine, until I converted it to run as a Service, and now it periodically aborts with:- "Connection is busy with results for another command"
There seems to be no Rhyme or Reason to when it aborts - sometimes it will work for an hour or two other times it will abort after a few minutes.
Any help would be welcome.
Si
-
Oct 29th, 2002, 11:04 AM
#2
I'm not sure if this is it or not but if a SQLReader is using a connection the connection can't be used by anything else until its done. It sort of locks up or hogs the connection until its done reading. If you try to use the connection during that time you get an error something like this. Does that sound like it could apply?
-
Oct 29th, 2002, 12:12 PM
#3
Thread Starter
Hyperactive Member
Thanks for the reply Edneesis.
I am pretty sure that the connection is not being used by anything else/to do anything else. The code body is now written as a dll (or should that be .Net assembly now) so I can run it either from a windows app (and consequently I can debug with the IDE) or from a Service.
The problem is that as a windows app it never goes wrong. As a service I get the error every 15 minutes or so.
I had a quick search for the error on the net (via google) and there seems to have been raised very similar problems - even to the point that one person had thefault in a service but not in a windows app, so I am now thinking that it may be a microsoft problem. Unfortunately this doesn't help me at all.
I appreciate you taking the time to reply (I love this place).
Si
-
Jul 20th, 2006, 11:38 AM
#4
New Member
Re: Connection is busy ... command (same warning, diffrnt problem, poss solution?!?)
Hey guys,
I've been having the same error message while trying to execute Update and Insert stored procedures through my app...
OK, it's a VB6 app sitting on top of a SQL Server 2000 db, so strictly not one for the .NET forum, but the thread title matches exactly...
the actual error is:
Run-time Error -2147467259 (80004005):
“Connection is busy with results for another command”
I'm using ADO and both Command and Recordset objects to update, insert and retrieve. Don't appear to be any problems with retrieving, but updates and inserts are throwing this (but strangely not all of them....).
I've ensured that there's only one connection to the database and that this is never busy (always in ready state before executing) but to no avail.
The commands themselves work fine when run directly through Query Analyser.
The weird thing is, when I declare and instantiate a new connection to the database, there's no error at all!! So it seems to be only to do with the one Connection object.
The chap i sit next to has his apps coded in the same style and has never seen this problem at all - i even went so far as to get my app looking as identical to his as possible in all code lines affected, but no joy...
Any ideas on why, how, what, etc etc
Many thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|