Is datareader quicker than dataset when populating a datatable?

前端 未结 8 1110
一个人的身影
一个人的身影 2020-11-29 11:43

Which would be quicker.

1) Looping a datareader and creating a custom rows and columns based populated datatable

2) Or creating a dataAdapter object and just

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 11:51

    The datareader is faster. And if you are using 2.0+ you probablt don't even have to use a datatable. You can use a generic list of your object.

提交回复
热议问题