473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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>
Nov 18 '05 #1
2 8102
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" <an*******@dotnet247.com> wrote in message
news:uI**************@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>

Nov 18 '05 #2
You might want to look at DataSet.Tables[x].Rows[x].ItemArray property.

"alpesh sharma via .NET 247" <an*******@dotnet247.com> wrote in message
news:uI**************@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>
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Peter Row | last post by:
Hi all, Here is my problem: I have a SQL Server 2000 DB with various NVarChar, NText fields in its tables. For some stupid reason the data was inserted into these fields in UTF8 encoding. ...
1
by: STeve | last post by:
Hi guys, I was wondering how I would go about creating a string array from a single column from a dataset. What I was thinking was iterate through each row in the dataset, finding out the size...
5
by: Trond | last post by:
I have a webservice that is returning a dataset. In dataset there is a table with 4 columns. (LDate, LTime, LDepth and ServiceNumber) I then try to read only 2 of the columns into array (double...
5
by: Roy Gourgi | last post by:
Hi, I am used to working in Visual FoxPro and I would like to be able to create a database and store and retrieve information from it. What is the simplest way to do it and what should I be...
12
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
4
by: Nikolay Petrov | last post by:
I am searching for an idea how to optimize some of my code. Let's say I have a class, which exposes some properties: Class Dummy1 Private m_sValue1 As String Private m_sValue2 As String...
0
by: Brian Henry | last post by:
Since no one else knew how to do this I sat here all morning experimenting with this and this is what I came up with... Its an example of how to get a list of items back from a virtual mode list...
0
by: r1 | last post by:
I am relatively inexperienced in using delegates and asynchronous methods. I read several articles, and then I developed my own code with a mission to improve the performance. Wow! I cannot...
4
by: SteveT | last post by:
I am wanting to populate several treeviews, one for the <TRs> group and one for the <TGsgroup. Is there a simplier way to populate the Treeview than the one I did below? It seems difficult to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.