fiogf49gjkf0d I been to busy looking at the internet when the solution is right in front of me in another page 
also what are the Pro's / Con's of using Hql over Sql?
if (_hqlBindingSource == null)<br /> { List<HqlSelectField> sel = new List<HqlSelectField>(); sel.Add(new HqlSelectField("h.id", "HistoryId")); sel.Add(new HqlSelectField("h.Description", "Description")); sel.Add(new HqlSelectField("h.CreateDate", "CreateDate")); sel.Add(new HqlSelectField("h.Notes", "Notes")); sel.Add(new HqlSelectField("ui.UserName", "UserName")); _hqlBindingSource = new WebHqlListBindingSource(sel, "History h, UserInfo ui"); } return _hqlBindingSource;
and the where clause is done onformbound
HqlBindingSource.Where = string.Format("h.UserId = ui.id and Type = {0} and {1} = '{2}'", (int)HistoryType.atNote, keyId, entityID);<br /> HqlBindingSource.OrderBy = "CompletedDate desc"; HqlBindingSource.BoundGrid = grdNotes; grdNotes.DataBind();
|