Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 a problem with connection pooling

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-10-15 : 08:26:21
Elif writes "Hi,

I have a problem while using connection pooling with SQL server.

While debuging my program, I followed the following steps:

while SQL server is running, I opened a database connection with the sqlconnection.Open() method, executed my query and then closed the connection with the sqlconnection.Close() method.

Then I stopped the sql server.

Again I called the sqlconnection.Open() method, it executed successfully without error! an exception such as "sql server does not work or access is denied" was not thrown, because
there was an open connection handle in the pool,so it is used I think but I would accept the excepiton here!
at this point I tried to execute my query on the server, an exception "general network problem" is then thrown.

Isn't there a way to use a connection from the pool but also understand that sql server does not work while trying to connect to the server and catch the exception.

Thanks advancely

Elif ERKUL"

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2003-10-15 : 11:20:13
Don't stop the server

Here is some more on the topic, I think you might be outta luck.

http://www.sqlblogs.com/justinb/posts/162.aspx



Damian
Go to Top of Page
   

- Advertisement -