views:

30

answers:

0

I'm using VS2008 to connect to a SQL server database in order to populate it in C#. It's going pretty well, I'm able to query, insert, and update all tables in my database successfully, except one. Anytime I try to query or insert into one table I get the following error:

Message = "Invalid object name 'DB_NewModelStoreContainer.DATATYPE'."

the query that generated this error is:

var test3 = (from o in context.DATATYPE
where o.DATETYPE_NAME == "Single"
select o).First();
(yes I know it should be DATATYPE, but that is not the problem =) )

Whenever I added the database to my project, for some reason it marked every attribute in the DATATYPE table as a primary key. I went into the xml of the .edmx and fixed this but I still get this error and I cannot find out why ><. Any help at all would be very greatly appreciated! Thanks in advance.