daelmo wrote:
This is your first quey:
select count(candidateid) from jobapplication group by jobdetailid;
Such query generates more than one result (row), right?
If it generates more than one result you cannot use GetScalar. If you only want the total count, then the GetScalar is just fine
Hi Daelmo,
Thanks for make me clear. well i want to know that in below code:
EntityFields fields = new EntityFields(1);
fields.DefineField(JobApplicationFields.CandidateId, 0);
fields[0].SetAggregateFunction(AggregateFunction.Count);
IGroupByCollection groupByClause = new GroupByCollection();
groupByClause.Add(JobApplicationFields.JobDetailId);
DataTable dynamicList = new DataTable();
TypedListDAO dao = new TypedListDAO();
dao.GetMultiAsDataTable(fields, dynamicList, 0, null, null, null, true, groupByClause, null, 0, 0);
how to display the output above code in gridview??? because dao.GetMultiAsDataTable return bool value.