我有C#客戶端應用程序調用WCF調用的Windows webservice調用Sql過程和此過程給出輸出大約130萬條記錄,然後C#客戶端應用程序將它們保存在內存中並逐個執行所有驗證 我收到錯誤:System.OutOfMemoryException
System.Exception: An exception has occurred when recalculating the balances, the transaction will be rolled back.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Collections.Generic.List`1.set_Capacity(Int32 value)
at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
at PitToPort.DataLayer.StockpileData.StockpileProfile.CreateStockpileProfileQualityFromAllPartialMovements()
at PitToPort.DataLayer.StockpileRecalc.Recalc.CreateSP_FOFO_FOLO_NegTransaction(Int32 modelID, StockpileProfile currentStockpileProfile, TransactionsRow drTransactions)
at PitToPort.DataLayer.StockpileRecalc.Recalc.CreateBalanceFOLO_FOFO_TWAA(TransactionsRow[] drTransactionsRows, Int32 modelID, StockpileProfileList stockpileProfileList)
at PitToPort.DataLayer.StockpileRecalc.Recalc.CreateBalances()
at QMastor.PitToPort.StockpileRecalculationBL.RecalcService.CreateBalances()
可能是什麼造成這個錯誤,如何糾正呢?我已經檢查過程中,它運行良好
是的,proc給出了約130萬條記錄的結果 – rmdussa 2009-06-23 06:19:49