newbie needs help with DataSet

  • Thread starter Thread starter Danny Ni
  • Start date Start date
D

Danny Ni

Hi,

I have a dataset which has one datatable which has one datacolumn, is there
a way to convert it to a String[]?

TIA
 
You mean like
myString=ds.tables("MyTable").Rows(n).Items("MyColumn").ToString

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
No. I meant coverting all the datarows into a String array, say I have 3
rows in dataset with datacolumn values "a", "b", "c" respectively. I want ro
get a String array, say aryTemp with aryTemp[0] = "a", aryTemp[1] = "b",
aryTemp[2] = "c".

William (Bill) Vaughn said:
You mean like
myString=ds.tables("MyTable").Rows(n).Items("MyColumn").ToString

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Danny Ni said:
Hi,

I have a dataset which has one datatable which has one datacolumn, is there
a way to convert it to a String[]?

TIA
 
ADO classic had a GetString that could be used like this. But why? The
DataTable Rows collection is simply an array and it addressed like one.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Danny Ni said:
No. I meant coverting all the datarows into a String array, say I have 3
rows in dataset with datacolumn values "a", "b", "c" respectively. I want ro
get a String array, say aryTemp with aryTemp[0] = "a", aryTemp[1] = "b",
aryTemp[2] = "c".

William (Bill) Vaughn said:
You mean like
myString=ds.tables("MyTable").Rows(n).Items("MyColumn").ToString

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Danny Ni said:
Hi,

I have a dataset which has one datatable which has one datacolumn, is there
a way to convert it to a String[]?

TIA
 
Back
Top