|
-
Feb 21st, 2003, 08:48 AM
#1
Thread Starter
New Member
Disappearing connections..
Hi
I am having some trouble with an ADO Command object.
I am using a class with command and connection objects as member variables.
The command and connection objects are initialised with the class instance.
Method calls on my object use the command object to run a stored procedure on a SQL2000 db. The command is executed asynchronously and an event handler is in place on the connection object to handle the ExecuteComplete callback.
Every 4 or 5 calls results in the 'Connection cannot be used it is either closed or invalid...' error. The ActiveConnection property of the command object is now Nothing.
This is not done anywhere in the code and my object does not terminate throughout this application.
I am tearing my hair out trying to solve this.. Does anyone have any ideas..?
-
Feb 21st, 2003, 11:17 AM
#2
Frenzied Member
There has to be a place in code where you close the connection or sets the activeconnection of the command to nothing.
If not the only option i see that the connection is closed because it was interupted over the network ?
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Feb 21st, 2003, 11:30 AM
#3
Thread Starter
New Member
Sorry swatty
The connection object held in my object still has a valid connection, its state is ok and its errors collection is empty.
And nowhere in the code is the command object altered aside from setting different values into the parameters until the program is ended.
Thanks for your thoughts though.
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
|