Home All Groups Group Topic Archive Search About
Author
5 May 2005 6:12 AM
chris ong via DotNetMonster.com
hi everyone

i dont noe where to post this msg... i guess i just post it here

i have a problem here.. i am using dataset to store information from a
table in the database.. then out put the result and sace it into a note pad
..txt file.. i can get the fields all out but i have a problem.. i cant get
the column header.. can i know to do do it??

chris

--
Message posted via http://www.dotnetmonster.com

Author
6 May 2005 12:32 PM
Elton W
Hi Chris,

Following code snippet shows how to get column header in
DataSet (actually DataTable):

foreach (DataColumn col in ds.Tables[0].Columns)
{
   string header = col.ColumnName;
}

HTH

Elton Wang
elton_w***@hotmail.com

>-----Original Message-----
>hi everyone
>
>i dont noe where to post this msg... i guess i just post
it here
>
>i have a problem here.. i am using dataset to store
information from a
>table in the database.. then out put the result and sace
it into a note pad
>..txt file.. i can get the fields all out but i have a
problem.. i cant get
Show quoteHide quote
>the column header.. can i know to do do it??
>
>chris
>
>--
>Message posted via http://www.dotnetmonster.com
>.
>