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

    Add Data in Database

    How do u add a new record using the dataset in vb.net?
    Not thro the insert command but using dataset.

    Thnx

  2. #2
    Join Date
    Jul 2002
    Posts
    10
    DataRow NewRow;


    NewRow = dataset.Tables["MyTable"].NewRow();

    NewRow["MyColumn1"] = "blabla";
    dataset.Tables["MyTable"].Rows.Add ( NewRow );

    (through dataset... ofcourse you have to call also
    sqlDataAdapter.Update(dataset.Tables["MyTable"]) to actually write the difference to a database table... (this goes through INSERT, UPDATE, DELETE statements in sqlDataAdapter... )

    regars

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