title: An exception is thrown after a row is deleted from a strongly typed DataSet?
body: <p>I am using .NET 4.0 and SQL Server 2008 R2.</p>
  
  <p>I have three tables:</p>
  
  <pre><code>Companies (PK CompanyID) 
  Addresses (PK AddressID, FK CompanyID) 
  ContactPersons (PK ContactPersonID, FK CompanyID)
  </code></pre>
  
  <p>CompanyID is assigned manually by the users. The other IDs are auto-generated. Companies has a one-to-many relationship with ContactPerson. I have set any changes to cascade.</p>
  
  <p>I display all records in Companies in a DataGridView and when a row is clicked, the corresponding records in ContactPersons are displayed in a second DataGridView.</p>
  
  <p>Then I delete a row from the table ContactPersons with:</p>
  
  <pre><code>DataRow row = m_SoldaCompaniesFileDataSet.ContactPersons.Rows.Find(this.m_CurrentContactPerson.ContactPersonID);
  row.Delete();
  </code></pre>
  
  <p>And when I try to query the table with to create a datasource to populate the DataGridView:</p>
  
  <pre><code>var dataRows_ContactPersons = from row in this.m_SoldaCompaniesFileDataSet.ContactPersons
                                where row.CompanyID == companyID
                                select new
                                {
                                   ContactPersonID = row.ContactPersonID,
                                   CompanyID = row.CompanyID,
                                   NameFirst = row.NameFirst,
                                   NameLast = row.NameLast,
                                   PhoneNumber = row.PhoneNumber,
                                   EmailAddress = row.EmailAddress,
                                   Position = row.Position
                                };
  </code></pre>
  
  <p>I receive DeletedRowInaccessibleException. Any ideas what I am doing wrong here?</p>
  
  <p>Actually the exception comes from that autogenerated code for the typed DataSet:</p>
  
  <pre><code>[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
              public int CompanyID {
                  get {
                      try {
                          return ((int)(this[this.tableContactPersons.CompanyIDColumn])); // &lt;&lt;&lt;--- DeletedRowInaccessibleException
                      }
                      catch (global::System.InvalidCastException e) {
                          throw new global::System.Data.StrongTypingException("The value for column \'CompanyID\' in table \'ContactPersons\' is DBNull.", e);
                      }
                  }
  </code></pre>