Vimala P
Vimala P

Reputation: 3

How to convert DataTable[] to DataSet in vb.net or c#

how to convert DataTable Array to DataSet?

dim DT_array as Datatable()
dim DS as Dataset
Ds=?

Upvotes: 0

Views: 1496

Answers (2)

jmcilhinney
jmcilhinney

Reputation: 54417

There's no actual conversion to be done. The Tables collection of the DataSet is where the tables are stored. Like so many other collections, it has an AddRange method:

DS.Tables.AddRange(DT_array)

Upvotes: 1

InteXX
InteXX

Reputation: 6367

This will work:

DS.Tables.AddRange(DT_array)

Upvotes: 2

Related Questions