Keith,
I am sure the handel is not becoming invalid cause you are passing it, but because the connection is closing.
What are the properties of your connection. Do you have a time out set on it? Make sure you have the connectino set not to time out. If the connection was obtained by opening a view, and then getting its handle, if views using that connection close, the handle/conn will close.
Just a few things to look at.
BOb
>Hello,
>
>I have a class that creates a connection to an SQL Server and passes the resulting connection handle value to other classes needing it. I've noticed as the number of classes the handle is passed to grows, I get an error message stating "Connection handle is invalid". Is there a limit to the number of times a handle can be passed? Should each class create its own connection?
>
>Thanks,
>
>Keith Robinson
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement