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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only