I keep getting this error with my below LINQ statement, and I can’t figure out why.
The text data type cannot be selected as DISTINCT because it is not comparable.
var reportLoad = from dash in
(from rl in QVuser.QlikViewPermissions
join d in QVuser.QlikViewDashboards on rl.DashboardId equals d.DashboardId
where rl.UserId == user && rl.Active == true
group rl by new { DashName = d.DashboardName, DashProdLink = d.ProductionLink, DashTestLink = d.TestLink } into g
select new { DashName = g.Key.DashName, DashProdLink = g.Key.DashProdLink, DashTestLink = g.Key.DashTestLink })
select new
{
DashName = dash.DashName,
DashLink = (whichServer.UseProductionServer ? dash.DashProdLink : dash.DashTestLink)
};
this.DataList1.DataSource = reportLoad;
this.DataList1.DataBind();
I figured it out.