manually populating dataset

  • Thread starter Thread starter Aaron Irizarry
  • Start date Start date
A

Aaron Irizarry

How can I manually populate a dataset with values? And how can I read from
these values?

I'd like my DS to have three coluns (X,Y,Z) and add ten rows of data to the
DS. Then I'd like to read it back.

Thanks.
 
Aaron,

You might want to consider something like a four dimensional array for
this (since the number of values is so small). You can use a DataSet. In
order to do so, just create a new instance of the data set. Once you have
it, create a DataTable, and then add it to the Tables collection on the
DataSet. Create DataColumns and add it to the Columns collection on the
Table, and then create your DataRow instances, and add them to the Rows
collection.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top