Connecting Tech Pros Worldwide Help | Site Map

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

  #1  
Old November 18th, 2005, 07:09 PM
alpesh sharma via .NET 247
Guest
 
Posts: n/a
(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, 07:09 PM
Hermit Dave
Guest
 
Posts: n/a

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, 07:09 PM
Shiva
Guest
 
Posts: n/a

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>


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract Single Record from Dataset filled from SP Output Ben answers 6 November 17th, 2006 08:15 PM
Copy/Paste Image from Clipboard lgbjr answers 7 November 21st, 2005 01:42 PM