[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Getting information from a datarow

Posted on 2007-07-24
8
Medium Priority
?
183 Views
Last Modified: 2010-04-15
Hi, how do you read information from a datarow?  I have a datarow which I populate and now i want to pull out information from it.
0
Comment
Question by:mitesh114
  • 2
  • 2
5 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 19554470
dataror["columnname"] will give u the value.
0
 

Author Comment

by:mitesh114
ID: 19554478
How do I loop through the entire data??
0
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 1000 total points
ID: 19554556
like ho do u have the data.. in a data table ?
then

for(int i=0;i<FTAble.Rows.Count;i++)
{
   object Data = Ftable.Rows[i]["ColumnName"];
}
0
 
LVL 22

Assisted Solution

by:JimBrandley
JimBrandley earned 1000 total points
ID: 19557591
The previous post loops over rows from a data table. If instead, you want to loop over the columns in a single row:
int count = myDataRow.Columns.Count;
string content;
for (index = 0; index < count; i++)
{
   content = myDataRow.Columns[index].ToString();
}
0
 
LVL 22

Expert Comment

by:JimBrandley
ID: 19742734
Bob - I'm still interested. Will support whatever you suggest.

Jim
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question