dataTablereader

Last post 07-21-2008 9:42 AM by Sonu. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-21-2008 8:15 AM

    dataTablereader

     Hi Friends,

    Here In my application I placed one button and when I click on the button I need to read the data from database and we need to store that in dataset then by using datatablereader how can I  read the records one by one from dataset and the columns values Ineed to display on the textboxes...........Anybody can help on this.

    Regards,

    Venkatesh.

    9886008288(Banglore).

     

    Filed under:
  •  Advertisement

    3 MONTHS FREE & FREE SETUP on ASP.NET 3.5/2.0 Web Hosting! Windows 2008 & 2003 Servers Available, MS SQL 2008/2005, .NET 3.5 SP1, Entity Framework, LINQ, Silverlight 2.0, 30 Day Money Back Guarantee – Click Here!

     
  • 07-21-2008 8:46 AM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 10,057
    • MVP

    Re: dataTablereader

    Check out this post about the DataTableReader:

    http://dotnetslackers.com/Community/blogs/kaushalparik/archive/2008/06/05/datatablereader-class-in-ado-net.aspx

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
  • 07-21-2008 9:29 AM In reply to

    • janis
    • Top 50 Contributor
    • Joined on 07-16-2008
    • The Netherlands
    • Wannabe Slacker
    • Points 487

    Re: dataTablereader

    why use datareader?

     

    why not datarow..

     

     

    datarow dr = new datarow();

    dataset ds = new dataset();

     

     

    dr = ds.tabels[0].rows[0];

    balkjb.text = dr["test_id"].tostring();

     

    or

    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
     {

    dr = ds.tabels[0].rows[ i];

    balkjb.text += " ";

    balkjb.text += dr["test_id"].tostring();


                           
    }

    <<--..Nothing blows harder than a turbo .... Not even your girlfriend..-->>
  • 07-21-2008 9:42 AM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 10,057
    • MVP

    Re: dataTablereader

    janis:
    why use datareader?

    I believe that similar to the SQLDataReader the DataTableReader will be faster, then iterating through the DataTable.Rows collection.

     

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
Page 1 of 1 (4 items)