Datatable vs Dataset

后端 未结 7 2035
失恋的感觉
失恋的感觉 2020-11-29 20:02

I currently use a DataTable to get results from a database which I can use in my code.

However, many example on the web show using a DataSet instead and accessing th

相关标签:
7条回答
  • 2020-11-29 20:52

    One major difference is that DataSets can hold multiple tables and you can define relationships between those tables.

    If you are only returning a single result set though I would think a DataTable would be more optimized. I would think there has to be some overhead (granted small) to offer the functionality a DataSet does and keep track of multiple DataTables.

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