It seems that the old SqlHelper class from the Microsoft Enterprise Library has been replaced mainly by the database class, which is included in the new version of Enterprise Library version 5.
I have a very simple and trivial example:
using Microsoft.ApplicationBlocks.Data; private void PopulateCheckBoxGroup() { const string strConnTxt = "Server=(local);Database=DataBindTests;Integrated Security=True;"; const string strlSql = "select Technology from PreferredTechnology where ParentId = 1"; CheckBoxList1.DataSource = SqlHelper.ExecuteReader(strConnTxt, CommandType.Text, strlSql); CheckBoxList1.DataTextField = "Technology"; CheckBoxList1.DataBind(); }
Can you just give me a hint to do the same using the new abstract database class that replaced SQLHelper? I looked into the corporate library 5 "Hands On Labs", and this is not mentioned.
early.
Erica source share