Solved

interogating a dataset

Posted on 2004-04-22
4
268 Views
Last Modified: 2010-04-24
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
Comment
Question by:StephenCairns
[X]
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
4 Comments
 
LVL 25

Expert Comment

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

0
 
LVL 25

Accepted Solution

by:
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")


0
 
LVL 3

Expert Comment

by:Lektran
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
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 10924031
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

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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 (http://www.ecb.europa.eu/stats/exch…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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