How do u add a new record using the dataset in vb.net?
Not thro the insert command but using dataset.
Thnx
Printable View
How do u add a new record using the dataset in vb.net?
Not thro the insert command but using dataset.
Thnx
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