| Change the connection string via Business Logic Layer (BLL) |
|
|
|
|
ASPX.CS C# - How to change the connection string via Business Logic Layer (BLL) [System.ComponentModel.DataObject] public class CustomerBLL : BaseBLL { private CustomerTableAdapter _adapter = null; protected CustomerTableAdapter Adapter { get { if (_adapter == null) _adapter = new CustomerTableAdapter(); if (HttpContext.Current.Session["ConnStr"] != null) _adapter.Connection.ConnectionString = "My connection string"; return _adapter; } } [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public DataSet.CustomerDataTable GetData() { return Adapter.GetData(); } } |
|
| Last Updated ( Wednesday, 28 February 2007 ) |
| < Prev | Next > |
|---|




Articles 



