Quick Questions re: ActualConnectionString

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 13-Mar-2005 15:32:13   

Quick question:

Is the ActualConnectionString that is part of DBUtils used only in the scope/thread where it was updated?

In other words, if I set it before using it in a long-running routine, will all other objects (in other threads) use the same connection string until I reset it to string.Empty?

If so, is there a workaround for this? Do I have to switch from Self-Servicing to Adapter to get per-thread connection string control?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 14-Mar-2005 11:27:32   

psandler wrote:

Quick question:

Is the ActualConnectionString that is part of DBUtils used only in the scope/thread where it was updated?

No it has appDomain scope.

In other words, if I set it before using it in a long-running routine, will all other objects (in other threads) use the same connection string until I reset it to string.Empty?

If so, is there a workaround for this? Do I have to switch from Self-Servicing to Adapter to get per-thread connection string control?

You can't do that safely. You have to use adapter if you want per thread connection strings.

Frans Bouma | Lead developer LLBLGen Pro