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

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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML - Color not displaying correctly in EMAIL. 6 49
.NET 2008 VB and C# 6 39
Code enhancement 4 20
VB.net -  GroupBox / Panel DataBinding and behavior 3 11
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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…

789 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