sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
alpesh sharma via .NET 247's Avatar

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


Question posted by: alpesh sharma via .NET 247 (Guest) on November 18th, 2005 07:09 PM
(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 Answers Posted
Hermit Dave's Avatar
Guest - n/a Posts
#2: 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]


Shiva's Avatar
Guest - n/a Posts
#3: 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>


 
Not the answer you were looking for? Post your question . . .
196,827 members ready to help you find a solution.
Join Bytes.com

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 196,827 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors