DataTable values

J

Janaka

I've got a DataSet which I'd like to be able to get all the values out of
one of the DataTable columns. These may be either string or integer values.
What I'd like ideally is to be able to get each row in the column of the
DataTable into a typed array. Is there something similar to Split() that I
can use on one of these objects? Otherwise it requires me doing an
iterative loop through each row in the DataTable.
 
K

Kevin Spencer

If working with a DataTable, looping through the rows is your only
alternative. However, it dowes seem that you may be wasting some cycles
using a DataSet, as you want your data put into an array. It would be more
efficient to use a DataReader to create your array. A DataReader is used
internally by the DataAdapter to build a DataSet. Unless you need all the
functionality of a DataSet, a DataReader will perform much faster.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top