Solved

How do I access my DataSet's datarow elements by name?

Posted on 2014-04-02
1
272 Views
Last Modified: 2014-05-23
If I have a table within my DataSet and I need to access an item within one of the rows of my table, by the column name, how do i do this? the following does not work.

dsIH.Tables[0].Rows[j].ItemArray("INVOICE_ID").ToString(),
0
Comment
Question by:mikesExpertExchange
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
Steve Dubyo earned 500 total points
ID: 39973686
Hi,

This should do it..

dsIH.Tables[0].Rows[j]["INVOICE_ID"],

EDIT: Of course you can add ToString at the end of that if you need to return a string..

dsIH.Tables[0].Rows[j]["INVOICE_ID"].ToString(),
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

696 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