Yes, It was a problem...
But I solved it by doing the change in the connection string programatically
(add "Min Pool Size=1") only on the computer that enable the Single_User
mode. I then make a call to SqlConnection.ClearAllPool(), and open/close a
SqlConnection with the new connection string, and the pool will keep 1
connection only ont this computer. A check is also made at application
stratup. and a Reverse operation is made when user go back to MULTIUSER
mode.
Until now it seems to work perfectly....
Thank for your advices !
steph.
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:e3**************@TK2MSFTNGP05.phx.gbl...
"TheSteph" <Th******@NoSpam.comwrote in message
news:uU**************@TK2MSFTNGP06.phx.gbl...
Thank-you for the helpfull link !
To use " load balance timeout" I have to give a time in minute... and
it
work only with "clustered pooling" (I don't know what it is by the
way...)
Instead you gave me the idea to use the "Min Pool Size=1" option; since
I
use the same connection string for everything in my application I think
that
this way at least one connection will remain in the pool until the
application is closed.
I tested it and it seems to work fine : In Single_User mode I do not
loose
my session on the server anymore so others users cannot steal it...
Keep in mind that doing this will keep a client connected to the DB Server
for as long as the application is running, if you have many clients like
these, you'll exhaust the max. number of licensed connection with the DB
server for no good reason, more you are preventing other users to connect
even when you don't effectively need the connection.
Willy.