ClearPool Method

MySQL Connector/Net

Empties the connection pool associated with the specified connection.

Namespace:  MySql.Data.MySqlClient
Assembly:  MySql.Data (in MySql.Data.dll) Version: 6.2.2.0

Syntax

C#
public static void ClearPool(
	MySqlConnection connection
)
Visual Basic (Declaration)
Public Shared Sub ClearPool ( _
	connection As MySqlConnection _
)
Visual C++
public:
static void ClearPool(
	MySqlConnection^ connection
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
The MySqlConnection associated with the pool to be cleared.

Remarks

ClearPool clears the connection pool that is associated with the connection. If additional connections associated with connection are in use at the time of the call, they are marked appropriately and are discarded (instead of being returned to the pool) when Close is called on them.

See Also