How to append one DataTable to another DataTable

后端 未结 6 1081
臣服心动
臣服心动 2020-12-10 09:59

I would like to append one DataTable to another DataTable. I see the DataTable class has two methods; \"Load(IDataReader)\" and \"Merge(DataTable)\". From the documentation

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 10:37

    Merge takes a DataTable, Load requires an IDataReader - so depending on what your data layer gives you access to, use the required method. My understanding is that Load will internally call Merge, but not 100% sure about that.

    If you have two DataTables, use Merge.

提交回复
热议问题