M
Mark
I have a test program that connects to SQL server. All this test program
does is create a connection and then closes the connection. The following
code is a function to create N connections and then close them... testing
the use of the pool which i find it does work as stated in the docs. Now,
the issue i do see is that when i close this program ( windows application )
the connection pool still exists. When i run the program again and do
another test the second instance of the program will create a new connection
pool and then increment the connection counter by N. When this program
exits the connection pool still exists. What i would like to know is why
the connection pool still exists after my program exits. I am checking the
status of the connection pool information via the Performance monitor. I
want to know if i should be worried that the number of connection pools
increase per instance of the application i load. But each instance
correctly pools its own connections in its own connection pool.... help
please!!!
-mark
private void recConnect( int count )
{
SqlConnection tmpConnection = new SqlConnection( conString );
try
{
tmpConnection.Open();
}
catch ( Exception err )
{
textBoxLog.Text += "Connection " + count.ToString() + " " +
err.ToString() + " " + err.Message + Environment.NewLine;
return;
}
if ( count > 0 )
recConnect ( count - 1 );
tmpConnection.Close();
tmpConnection.Dispose();
}
does is create a connection and then closes the connection. The following
code is a function to create N connections and then close them... testing
the use of the pool which i find it does work as stated in the docs. Now,
the issue i do see is that when i close this program ( windows application )
the connection pool still exists. When i run the program again and do
another test the second instance of the program will create a new connection
pool and then increment the connection counter by N. When this program
exits the connection pool still exists. What i would like to know is why
the connection pool still exists after my program exits. I am checking the
status of the connection pool information via the Performance monitor. I
want to know if i should be worried that the number of connection pools
increase per instance of the application i load. But each instance
correctly pools its own connections in its own connection pool.... help
please!!!
-mark
private void recConnect( int count )
{
SqlConnection tmpConnection = new SqlConnection( conString );
try
{
tmpConnection.Open();
}
catch ( Exception err )
{
textBoxLog.Text += "Connection " + count.ToString() + " " +
err.ToString() + " " + err.Message + Environment.NewLine;
return;
}
if ( count > 0 )
recConnect ( count - 1 );
tmpConnection.Close();
tmpConnection.Dispose();
}