J
john
I get the following error on this Join Statement, but I thought the idea of
a LINQ Join is bring together different Data Context, the Intellisene shows
me both tables as a Result; any help is welcome.
Error message: The query contains references to items defined on a different
data context
Dim yr AS Date = Me.DDLfilterDate.SelectedItem.Text
Dim dbTime As New DataTimeRecordDataContext
Dim dbSoProj As New DataSolProjectsDataContext
Dim time = From t In dbTime.tblTimeRecords _
Join p In dbSoProj.PJPROJs On _
t.ProjectID Equals Trim(p.project) _
Where t.PeriodID = Me.DDLfilterDate.SelectedValue _
And t.DayDate.Year = yr.Year _
And t.Approved = True _
And t.Processed = False _
Select t.EmployeeID, t.ProjectID, t.TimeValue, t.DayDate, _
t.PeriodID, t.Task, t.Memo, p.gl_subacct
a LINQ Join is bring together different Data Context, the Intellisene shows
me both tables as a Result; any help is welcome.
Error message: The query contains references to items defined on a different
data context
Dim yr AS Date = Me.DDLfilterDate.SelectedItem.Text
Dim dbTime As New DataTimeRecordDataContext
Dim dbSoProj As New DataSolProjectsDataContext
Dim time = From t In dbTime.tblTimeRecords _
Join p In dbSoProj.PJPROJs On _
t.ProjectID Equals Trim(p.project) _
Where t.PeriodID = Me.DDLfilterDate.SelectedValue _
And t.DayDate.Year = yr.Year _
And t.Approved = True _
And t.Processed = False _
Select t.EmployeeID, t.ProjectID, t.TimeValue, t.DayDate, _
t.PeriodID, t.Task, t.Memo, p.gl_subacct