Connecting Tech Pros Worldwide Help | Site Map

how to retrieve dataset value one by one in an array of string.

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 18th, 2005, 06:09 PM
alpesh sharma via .NET 247
Guest
 
Posts: n/a
Default how to retrieve dataset value one by one in an array of string.

(Type your message here)
how to retrieve dataset value one by one in an array of string.
--------------------------------
From: alpesh sharma

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>tHD0uWyhDEeF3lf7xZsbdw==</Id>

  #2  
Old November 18th, 2005, 06:09 PM
Hermit Dave
Guest
 
Posts: n/a
Default Re: how to retrieve dataset value one by one in an array of string.

DataSet >> DataTable >> DataRows with have values corresponding to DataRow

Not sure if there is a method for DataSet or DataTable which allows you to
do so but here's one way i think you can do it.

int RowCount = yourDataTable.Rows.Count;
int ColumnCount = yourDataTable.Columns.Count;

string [rowCount][ColumnCount]
for(int i = 0; i <RowCount; i++)
{
for(int j=0; j < ColumnCount; j++)
{
string[i][j] = yourDataTable.Rows[i][j].ToString();
}
}

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"alpesh sharma via .NET 247" <anonymous@dotnet247.com> wrote in message
news:uIERZkWnEHA.3820@TK2MSFTNGP09.phx.gbl...[color=blue]
> (Type your message here)
> how to retrieve dataset value one by one in an array of string.
> --------------------------------
> From: alpesh sharma
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>tHD0uWyhDEeF3lf7xZsbdw==</Id>[/color]


  #3  
Old November 18th, 2005, 06:09 PM
Shiva
Guest
 
Posts: n/a
Default Re: how to retrieve dataset value one by one in an array of string.

You might want to look at DataSet.Tables[x].Rows[x].ItemArray property.

"alpesh sharma via .NET 247" <anonymous@dotnet247.com> wrote in message
news:uIERZkWnEHA.3820@TK2MSFTNGP09.phx.gbl...
(Type your message here)
how to retrieve dataset value one by one in an array of string.
--------------------------------
From: alpesh sharma

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>tHD0uWyhDEeF3lf7xZsbdw==</Id>


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.