This class provides a primitive connection pool for SqlCeDatabase.
More...
|
static void | CloseSharedConnection (Database database) |
| Closes the "keep alive" connection that is used by all databases with the same connection string as the one you provide. More...
|
|
static void | CloseSharedConnections () |
| Closes all "keep alive" connections for all database instanced. More...
|
|
static DatabaseConnectionWrapper | CreateConnection (SqlCeDatabase db, bool usePooledConnection) |
| Creates a new connection. If this is the first connection, it also creates an extra "Keep Alive" connection to keep the database open. If usePooledConnection is true, than if this connection has been opened before, the connection from the pool will be returned rather than creating a new one. More...
|
|
static DatabaseConnectionWrapper | CreateConnection (SqlCeDatabase db) |
| Creates a new connection. If this is the first connection, it also creates an extra "Keep Alive" connection to keep the database open. Always returns a new SqlCeConnection object, not a pooled one. More...
|
|
This class provides a primitive connection pool for SqlCeDatabase.
◆ CloseSharedConnection()
static void Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.SqlCeConnectionPool.CloseSharedConnection |
( |
Database |
database | ) |
|
|
static |
Closes the "keep alive" connection that is used by all databases with the same connection string as the one you provide.
- Parameters
-
database | The database with the connection string that defines which connections should be closed. |
◆ CloseSharedConnections()
static void Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.SqlCeConnectionPool.CloseSharedConnections |
( |
| ) |
|
|
static |
Closes all "keep alive" connections for all database instanced.
◆ CreateConnection() [1/2]
Creates a new connection. If this is the first connection, it also creates an extra "Keep Alive" connection to keep the database open. Always returns a new SqlCeConnection object, not a pooled one.
- Parameters
-
db | The database instance that will be used to create a connection. |
- Returns
- A new connection.
◆ CreateConnection() [2/2]
Creates a new connection. If this is the first connection, it also creates an extra "Keep Alive" connection to keep the database open. If usePooledConnection is true, than if this connection has been opened before, the connection from the pool will be returned rather than creating a new one.
- Parameters
-
db | The database instance that will be used to create a connection. |
usePooledConnection | If true, return an already created connection for this object. If false, always create a new one. |
- Returns
- A new connection.
◆ connections
Keeps a list of "keep alive" connections.
The documentation for this class was generated from the following file: