retrieve field from dataset


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: retrieve field from dataset

  1. #1
    Join Date
    Dec 2005
    Posts
    19

    retrieve field from dataset

    hello, I populated my dataset object with table Test that has 3 specific fields in it, namely "name" , "age", "sex".

    How can I get each one of them out from the dataset object, set the value of the textfield with it, then display the textfield on the HTML page? All datagrid can go is to get everything out, which is not what I wanted. Because I might only want the name and age, and display them separate places.

    Please help coz I'm a newbie to .NET. Also please suggest if I shouldn't be using dataset at all.

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    TextBox1.Text= MyDataSet.Tables("Test").Rows(0)("name").ToString()
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Dec 2005
    Posts
    19
    Thanks Phil

  4. #4
    Join Date
    Oct 2005
    Posts
    11
    Hey vivien.,
    Well if you want to screen data from dataset, you can use the Dataview
    Set the dataview's table property to whihc table u r gonna retrive values, use rowfilter property to filter those columns you need. and sort property according to which u can order the columns.
    Then give ur dataview as a datasource to ur datagrid. problem solved--!!

Similar Threads

  1. Using ADO to retrieve NWind Employee photo field - VB6
    By John Happy in forum VB Classic
    Replies: 3
    Last Post: 03-26-2009, 05:45 AM
  2. Replies: 0
    Last Post: 11-12-2002, 11:39 AM
  3. RETRIEVE VALUE OF KEY FIELD...?
    By Tom in forum .NET
    Replies: 1
    Last Post: 07-17-2002, 12:26 PM
  4. Null DateTime Field to retrieve
    By Saiful in forum VB Classic
    Replies: 4
    Last Post: 05-06-2001, 12:06 PM
  5. Ted, you're a prince!
    By Georgiana Trigg in forum VB Classic
    Replies: 0
    Last Post: 10-29-2000, 12:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center