TAILIEUCHUNG - Setting Connection Pooling Options

[ Team LiB ] Recipe Setting Connection Pooling Options Problem You need to know the different connection pooling options and how you can control them. Solution Use the connection string to control connection pooling for the SQL Server, OLE DB .NET, Oracle, or data provider. | Team LiB Recipe Setting Connection Pooling Options Problem You need to know the different connection pooling options and how you can control them. Solution Use the connection string to control connection pooling for the SQL Server OLE DB .NET Oracle or data provider. The sample code contains a method and four event handlers Creates a Connection attaches an event handler to its StateChange event and sets default properties for controls on the form that are used to specify connection properties. The UpdateConnection method is called to dynamically construct a connection string from the specified properties. UpdateConnectionString This method dynamically constructs a connection string from the connection string properties specified by the user in text boxes on the form. This method is called to update the connection string when the user changes the value of any of the controls used to specify connection string properties. Open Opens the Connection that is based on the connection string constructed in the UpdateConnectionString method. Close Closes the connection string. Displays original and current state information about the connection when its state changes. The C code is shown in Example 1-11. Example 1-11. File Namespaces variables and constants using System using using using using private SqlConnection conn . . . private void ConnectionPoolingOptionsForm_Load object sender e conn new SqlConnection new StateChangeEventHandler conn_StateChange S ql_ConnectString 15 0 0 100 true UpdateConnectionString private void UpdateConnectionString .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.