Solved

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

Posted on 2014-04-02
1
268 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now