CATEGORII DOCUMENTE |
Asp | Autocad | C | Dot net | Excel | Fox pro | Html | Java |
Linux | Mathcad | Photoshop | Php | Sql | Visual studio | Windows | Xml |
The DBConnectionSingleton class is the implementation of a database connection-specific object pool. The main purpose of this class is to provide database connection-specific implementations of the Create(), Validate(), and Expire() methods inherited from the ObjectPool class. The class also provides methods called BorrowDBConnection() and ReturnDBConnection() for borrowing and returning database connection objects from the object pool.
The complete listing of the DBConnectionSingleton class is as follows:
using System;As you are dealing with the SqlConnection object, the Expire() method closes the SqlConnection, the Create() method creates the SqlConnection, and the Validate() method checks whether the SqlConnection is open or not. The whole synchronization issue is hidden from the client application using the DBConnectionSingleton object instance.
Politica de confidentialitate | Termeni si conditii de utilizare |
Vizualizari: 752
Importanta:
Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved