Inserting a new row in merged dataSets

  • Thread starter Thread starter deshimam
  • Start date Start date
D

deshimam

Has anybody come across this?

I have a dataset with records of items and depending on itemID, I get
price of each item from another table. I am merging two datasets with
the primaryKey constraint. I have read all articles on this group to
see how to insert a new row in the item and then add a corresponding
price in another table when I have not inserted the data in the
database. i.e. I don't have the itemID when I insert the price. I want
to add more than one row and then commit the changes to the database
when user selects to save data.

Thanks,
 
Hello
It is not very clear to me what you are trying to do . You can always
Insert a Row into a DataTable of Dataset using the AddRow Method or Using
the Code like this .
Dim row As DataRow = DataSet1.Tables(0).NewRow()
row.Item(0) = "Hello"

This adds a new Row to the Datatable of Dataset . If you are getting some
Constarint Exceptions , You can Disable Constaints on Dataset when you are
adding any thing .

HTH

Thanks
Sunder
VB.Net



--------------------
 
Back
Top