First, Marcel, thank you for responding. I have not had a chance to try the custom transformation yet as described in the article.
Second, Dmitry, here is a code snippet showing the approach I'm using to try to retrieve the DB data. This is an .ascx transformation. I've simplified some of the variable names for readability. I cannot find any documentation which states that this should strip html tags for safety or otherwise. Thanks for your input and advice.
var qdparams = new CMS.DataEngine.QueryDataParameters();
qdparams.Add("@pkgid",packageID);
qdparams.Add("@pkgname",packageName);
qdparams.Add("@packagedate",packageDate);
string querytext="select * from wsc_PackageDetails where package_id=@pkgid and PackageName=@pkgname and start_datetime>@packagedate and not (DATEDIFF(D,package_date_start,start_datetime)=0 and status='WTL')";
System.Data.DataSet ds = CMS.DataEngine.ConnectionHelper.ExecuteQuery(querytext,qdparams,CMS.DataEngine.QueryTypeEnum.SQLQuery);
System.Data.DataTable dt = ds.Tables[0];
foreach (System.Data.DataRow row in dt.Rows){
string fieldData = row["fieldName"].ToString();
}