interogating a dataset

Posted on 2004-04-22
Last Modified: 2010-04-24
I am using an OracleDataAdapter to populate a dataset to return some data from the database
In the other times I have used this I have used a datagrid or drop down and bound the the control to that.  This time i need to extract from the dataset one single field into a text box.

How do I extract the data from a dataset to get a single value?

Question by:StephenCairns
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
  • 2
LVL 25

Expert Comment

ID: 10896958
textbox1.text = dc.tables(0).item("YOUR COLUMN NAME")

LVL 25

Accepted Solution

RonaldBiemans earned 125 total points
ID: 10896992
Sorry wrong suggestion,

Dm r as datarow = ds.tables(0).rows.find("your primary key Value")

textbox1.text = r.item("your column name")


Expert Comment

ID: 10909312
Could explain further as to what the single value will represent?

textbox1.DataSource = dataset.datatable
textbox1.DisplayMember = "column"

you would then have forward and back buttons to move through the dataset
LVL 10

Author Comment

ID: 10924031
 Thanks for that. I did not have a primary key set up so I used


the dataset only had one record

thanks to you all for replying


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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