DataReader error in 2026.100

We are seeing the below error in a few places while testing 2026.100, has anyone else seen this or know what to do about it?

This came up in Sales Order Entry, correlation ID brought us to a BPM that we’re looking into.

This also came up when i did an AP Payment. Process Payments - Select Report Style - Print. My payments worked, the payment number and sequencing inside AP Payment Entry worked but the report (remiitance advice) did not work.

Have seen it in SOEntry and Customer Shipment Entry as well. Likely the same issues others have reported - EFCore etc.

Yes, this is caused by restrictions due to EF Core. I have it in several BPMs, and it appears to be (I’ve only successfully squashed it in one BPM so far) due to nested foreach’s.

In the skeleton below, I have the relevant structure from one of my DD BPMs. To fix the error, I only had to add “.ToList()” after the SELECT of the inner foreach statement.

foreach (var ttTableRow in  
          (from TR in ttOrderHed            
          where (TR.RowMod != "")
          select new
                    {
                    TR.RowMod,
                    TR.Company,
                    TR.OrderNum,
                    TR.OrderDate,
                    TR.CustNum,
                    TR.PONum
                    }
           )
        )
//
//
// ITERATE THROUGH EACH ROW OF THE SELECT RESULTS    
//
//

 {
 
    //
    // GET NEXT RESULT ROW
    //
    var ttThisRow = ttTableRow;  
    
    var vThisRowCompany   = ttThisRow.Company;
    var vThisRowOrderNum  = ttThisRow.OrderNum;
    var vThisRowCustNum   = ttThisRow.CustNum;


    //
    // ITERATE THROUGH EACH ORDER LINE and RELEASE
    //                  
    using (var txScope = IceContext.CreateDefaultTransactionScope())
    {               
    foreach (var ttFullRow in
                (from OD in Db.OrderDtl.With(LockHint.NoLock)                               
                join OR in Db.OrderRel.With(LockHint.NoLock) on                             
                new {OD.Company, OD.OrderNum, OD.OrderLine} equals
                new {OR.Company, OR.OrderNum, OR.OrderLine}                           
                where (OD.Company         == vThisRowCompany)
                where (OD.OrderNum        == vThisRowOrderNum)
                select new
                        {
                            ttThisRow.RowMod,
                            ttThisRow.Company,
                            ttThisRow.OrderNum,
                            ODOrderLine             = OD.OrderLine,
                            ODPartNum               = OD.PartNum,
                            ODRevisionNum           = OD.RevisionNum,
                            ODLineDesc              = OD.LineDesc,
                            ODUnitPrice             = OD.UnitPrice,
                            OROrderRelNum           = OR.OrderRelNum,
                            ORShipToNum             = OR.ShipToNum
                            }
                  ).ToList()   // <------------ ADDED .ToList() HERE
             )
            {
             // DO INNER FOREACH STUFF
             }

} // END OF OUTER FOREACH

Note that my actual code (about 700 lines) has many more “(from xyz in …)” statements further above and below this code chunk, but it seems that for this error, it is the nested foreach’s that it doesn’t like.

I’m sure there are other code permutations that might generate this error, but hopefully, this is a useful starting point of what to check.

EDIT: Here is the comment that helped me understand what was causing it.

EDIT2: Repeated this fix for two more BPMs having this error, and it resolved the issue in both cases.

Thanks for the tips…I’m a n00b as far as coding goes, haven’t really had the opportunity to learn in full yet…passing the intel along to our consultants to hopefully help expedite the repairs.