CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Posts
    49

    Append data to a dataset

    Basically, all I'm trying to find out is whether or not data is able to be appended to a dataset.

    In other words, could I initially place 20 rows of data from my database into a dataset and then, after I've successfully retrieved those rows, add an additional 10 rows of data to it or are datasets sort of a 1 time thing?


    Thanks in advance.

    -Goalie35

  2. #2
    Join Date
    Sep 1999
    Location
    Madurai , TamilNadu , INDIA
    Posts
    1,024

    Re: Append data to a dataset

    You can add data to DataTable at any time.

    DataTable has a method called NewRow(). It will return a newly created DataRow object. Set values to it and then call "dataTable.Rows.Add()" method to add it to the DataTable.

    You can add a row to DataTable without calling "NewRow()" method(using the another Add(object[]) overloaded method).

    Check the DataTable::Rows property and DataRowCollection::Add method for more information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured