“Invalid attempt to call Read when reader is closed” error (for lengthy operations only)

后端 未结 2 1953
星月不相逢
星月不相逢 2020-12-10 23:34

We have a operation in which more than 100.000 records are read from a csv file and inserted in a database. When I am using a file with 10 records, the operation is complet

相关标签:
2条回答
  • 2020-12-10 23:49

    Could be a database timeout instead... you checked that?

    What are you actually trying to do anyway? If you really need to read so many rows perhaps consider reducing it into smaller chunks - say, only read 1000 at a time

    0 讨论(0)
  • 2020-12-11 00:01

    It was actually MSDTC & Transaction issue. I updated the MSDTC timeout in Component Services. Also I updated timeout values in System.Transactions in machine.config of the application server.

    0 讨论(0)
提交回复
热议问题