Results 1 to 4 of 4

Thread: [RESOLVED] Update Dataset and database Table

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    91

    Resolved [RESOLVED] Update Dataset and database Table

    Hai

    i am working with winforms and c# 2005.


    in ui i am making multiple record updations and sending as a DataTable


    Now how should i update dataset with modified data and how should i add those in Database. i should update multiple records at a time in Database.


    Thanks and Regards
    Vinay Kumar

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Update Dataset and database Table

    Presumably you used a DataAdapter or TableAdapter and called its Fill method to retrieve the data in the first place. You now use the same adapter and call its Update method to save the changes.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    91

    Re: Update Dataset and database Table

    Hai.Thanks for the reply


    i am having a Dataset

    dsTest with Table "Config"

    i got this using Adapter

    oledbTest.Fill(dsTest,"Config");

    Now i did modifications in the UI and i need to update those values to Dataset first , then i need to Update in the Database.


    My Problem is how to Update Dataset??i need to update multiple records with one click event.




    Thanks and Regards
    Vinay Kumar

  4. #4
    Lively Member fifo's Avatar
    Join Date
    Dec 2005
    Location
    HaiPhong, Vietnam
    Posts
    77

    Re: Update Dataset and database Table

    hey, i see.
    Firstly, if you want to update multil Rows from DS into DB, you MUST creat Command Updated for DataAdapter.

    Secondly, each DataAdapter have Commands for just only a Table.

    Try!
    !Have fun!

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