Menu

Help on Delete

Help
2004-10-22
2013-03-22
  • Dave Kekish

    Dave Kekish - 2004-10-22

    Hi,

    I've been trying the software out and I really like it.  however I'm getting an error when I delete records.

    Following the Doc examples I've done this

    foreach (Encounter_Proc_Master en_pm2 in en_pm_col)
    {
        en_pm2.Proc_Master.Delete();
        en_pm2.Delete();
    }

    It goes through the loop the first time without a problem,   However on the next pass thru, it tells me the collection has changed and the indexer is not working.  Then it bails.

    My question is how do I delete rows from a collection and not have this issue?

     
    • Dan

      Dan - 2004-10-26

      while ( students.Count > 0 )
      {
          students[0].Delete();
      }

      Thanks,

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.