Link to home
Start Free TrialLog in
Avatar of StephenCairns
StephenCairns

asked on

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
Avatar of RonaldBiemans
RonaldBiemans

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

ASKER CERTIFIED SOLUTION
Avatar of RonaldBiemans
RonaldBiemans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of StephenCairns

ASKER

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