Solved

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 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