I am afraid that with the information I gave made it impossible for anyone to resolve the issue. My mistake was the dbml was not site, but was a different name. When I pulled the sites table into the object relational designer it named it Site. So I was referencing the name it gave the table by mistake. Well, the more I fail the closer I come to success!
Looks like I owe you all a beer! Cheers! Greg On Nov 23, 6:08 am, Greg <[email protected]> wrote: > I have a program that I am starting to write that uses LINQ to fetch > SQL information. > I add a Linq to SQL class and it is called site with the Site ID being > the primary key that is an autogenerated number and the SiteName which > is a varchar(50). Neither field allows nulls. > > so now the code giving me an issue > > Site db = new Site(); > var query = from sn in db.SiteName //<===== This line is > erroring out > select sn; > > With the error > ArgumentNullException was unhandled > Value cannot be null. > Parameter name: source > > I do not understand why this is happening. I am just quesrying the > data (only 3 items in table) > > Can anyone explain to me what am I missing here?
