VistaDB 5
Example 






The VistaDBConnection to be cleared from the pool.
ClearPool Method
Empties a single connection pool associated with the specified connection. This may be useful if you are wanting to release a single connection string but keep other connections active in your application.
Syntax
'Declaration
 
Public Shared Sub ClearPool( _
   ByVal connection As VistaDBConnection _
) 
'Usage
 
Dim connection As VistaDBConnection
 
VistaDBConnection.ClearPool(connection)
public static void ClearPool( 
   VistaDBConnection connection
)
public procedure ClearPool( 
    connection: VistaDBConnection
); static; 
public static function ClearPool( 
   connection : VistaDBConnection
);
public: static void ClearPool( 
   VistaDBConnection* connection
) 
public:
static void ClearPool( 
   VistaDBConnection^ connection
) 

Parameters

connection
The VistaDBConnection to be cleared from the pool.
Example
using( VistaDBConnection conn = new VistaDBConnection(@"Open Mode=ExclusiveReadWrite;Min Pool Size=5;Data Source=" + dbname) ) 
{ 
    Assert.IsNotNull(conn); 
    conn.Open(); 
    Assert.IsTrue(conn.State == ConnectionState.Open); 
    conn.Close(); 
    VistaDBConnection.ClearPool(conn); 
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also