OleDbException System Resources Exceeded

后端 未结 5 761
感动是毒
感动是毒 2020-12-11 04:07

The following code executes a simple insert command. If it is called 2,000 times consecutively (to insert 2,000 rows) an OleDbException with message = \"System Resources Ex

5条回答
  •  误落风尘
    2020-12-11 04:27

    I tested this code out with an Access 2007 database with no exceptions (I went as high as 13000 inserts).

    However, what I noticed is that it is terribly slow as you are creating a connection every time. If you put the "using(connection)" outside the loop, it goes much faster.

提交回复
热议问题