Home All Groups Group Topic Archive Search About

How convert dataset to arraylist?

Author
2 Jul 2005 4:26 AM
VB Programmer
I have 1 table in a dataset.  How can I easily convert it to an arraylist
(with structure arraylist elements)?

Author
2 Jul 2005 8:47 AM
Chad Z. Hower aka Kudzu
"VB Programmer" <xDontEmai***@Dont.com> wrote in
news:#3CYy4rfFHA.1444@TK2MSFTNGP10.phx.gbl:
> I have 1 table in a dataset.  How can I easily convert it to an
> arraylist (with structure arraylist elements)?

What type do you want to store in the arraylist? Why do you want to convert it to an arraylist.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
  http://www.atozed.com/IntraWeb/
Author
2 Jul 2005 9:39 AM
Armin Zingler
"VB Programmer" <xDontEmai***@Dont.com> schrieb
> I have 1 table in a dataset.  How can I easily convert it to an
> arraylist (with structure arraylist elements)?

I don't know what you mean by "structure arraylist elements", but... :

  al.AddRange(ds.Tables("mytable").Select)


Armin
Author
3 Jul 2005 7:08 AM
Cor Ligthert
VB Programer

dim ar as arraylist
For each dt as datatable in ds.tables
    ar.add(dt)
Next

This can have sense when you want to remove some datatables from a a dataset
and place them originaly again in another one.

However as Kudzu said, what is your goal?

I hope this gives an idea

Cor