Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

interogating a dataset

Hi
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?

regards
0
StephenCairns
Asked:
StephenCairns
  • 2
1 Solution
 
RonaldBiemansCommented:
textbox1.text = dc.tables(0).item("YOUR COLUMN NAME")

0
 
RonaldBiemansCommented:
Sorry wrong suggestion,

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

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


0
 
LektranCommented:
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
0
 
StephenCairnsAuthor Commented:
RonaldBiemans
 Thanks for that. I did not have a primary key set up so I used

ds.tables(0).rows.item(0)

the dataset only had one record

thanks to you all for replying

cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now