473,386 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

LINQ Join Error

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
Feb 27 '08 #1
0 967

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: shapper | last post by:
Hello, I have 2 tables: Aid, Aname ... Bid, Aid, Bname ... I need to get the records in B given a Bname and a Aname. I think I should use Inner Join. I wrote the following code:
7
by: =?Utf-8?B?VG9tIEJvbWJhZGls?= | last post by:
Question: Can an outer non-equijoin be simulated using LINQ? It's quite unfortunate that LINQ doesn't support literal joins based on anything other than equality. I know that this the most common...
8
by: Alcides | last post by:
Hello all, I learn about LINQ here in this forum. I been a VB.NET programmer for quite a while and we are using an internal solution for SQL access. I have some experience with C# and I started...
2
by: kfparri | last post by:
Hi, I am trying to join together a table out of a database using Linq to SQL with a list of class objects using a linq statement. I don't know if this is possible, so could someone please help...
9
by: shapper | last post by:
Hello, I am used to SQL but I am starting to use LINQ. How can I create Left, Right and Inner joins in LINQ? How to distinguish the different joins? Here is a great SQL example:...
4
by: Jon Skeet [C# MVP] | last post by:
On Jul 15, 4:01 pm, raulavi <raul...@discussions.microsoft.comwrote: Are you talking about LINQ to Objects or LINQ to SQL? For the latter, I'd say it contains two implicit joins - one in the fact...
1
by: shapper | last post by:
Hi, On a form I have an input where tags are inserted in a CSV format. Then on my code I convert the CSV string to a List<Tag>. Tag is an object with two properties: TagID and Name So when I...
4
by: shapper | last post by:
Hello, I have the following Linq query: var q = (from p in database.Posts join pt in database.PostsTags on p.PostID equals pt.PostID join t in database.Tags on pt.TagID equals t.TagID group...
2
by: shapper | last post by:
Hello, I have the following Linq query: List<PostsTaginsert = (from t in (from t in database.Tags join p in paper.Tags on t.Name equals p.Name select t).ToList() select new PostsTag {
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.