Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4622746
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:53:13+00:00 2026-05-22T02:53:13+00:00

I have an LINQ entity like so: ID1 INT ID2 INT ID3 INT Value

  • 0

I have an LINQ entity like so:

ID1 INT
ID2 INT
ID3 INT
Value VARCHAR(50)

ID1, ID2 & ID3 are composite primary keys. It has no association with any other entity.

An IndexOutOfRangeException is thrown whenever I update or delete after SubmitChanges. I’m running on .NET 3.5 SP1.

I have tried creating another project, still on .NET 3.5 SP1, but don’t encounter that exception.

Here is the code:

        DataClasses context = new DataClasses();
        Entity entity = (from entities in context.Entities
                              where entities.ID1 == 3
                                && entities.ID2 == 1
                                && entities.ID3 == 1
                              select entities).First();

        context.Entities.DeleteOnSubmit(entity);
        context.SubmitChanges();

Here is the exception:

System.IndexOutOfRangeException was unhandled by user code
  Message="Index was outside the bounds of the array."
  Source="System.Data.Linq"
  StackTrace:
       at System.Data.Linq.IdentityManager.StandardIdentityManager.MultiKeyManager`3.TryCreateKeyFromValues(Object[] values, MultiKey`2& k)
       at System.Data.Linq.IdentityManager.StandardIdentityManager.IdentityCache`2.Find(Object[] keyValues)
       at System.Data.Linq.IdentityManager.StandardIdentityManager.Find(MetaType type, Object[] keyValues)
       at System.Data.Linq.CommonDataServices.GetCachedObject(MetaType type, Object[] keyValues)
       at System.Data.Linq.ChangeProcessor.GetOtherItem(MetaAssociation assoc, Object instance)
       at System.Data.Linq.ChangeProcessor.BuildEdgeMaps()
       at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
       at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
       at System.Data.Linq.DataContext.SubmitChanges()
       at Project.Page.Page_Load(Object sender, EventArgs e) in C:\ProjectFolder\Project\Page.aspx.cs:line 31
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException: 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:53:14+00:00Added an answer on May 22, 2026 at 2:53 am

    I re-created the DBML from scratch. Sigh…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to know if it's possible to have both Linq-to-SQL and Entity Framework
i have some Linq to Entity code like so: var tablearows = Context.TableB.Include(TableA).Where(c =>
I have a linq Entity called Enquiry, which has a property: string DateSubmitted. I'm
I have a LINQ entity that I need to create a special string value
I have a LINQ query mapped with the Entity Framework that looks something like
I have a form with a select box on it. The linq entity has
I have an Entity like this: public class Category { public int classid {get;set;}
I have a LINQ to ENTITY query that pulls from a table, but I
So, I am using the Linq entity framework. I have 2 entities: Content and
I have a simple LINQ query on ADO.NET Entity Framework as follows var result

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.