VB.net save a DataRow after adding it to a DataTable

Hi

If a DataTable is pulled from a SQL database table and a new row added with code
like that below. How do you save the new DataRow back to the SQL database

Dim newCustomersRow As DataRow = DataSet1.Tables("Customers").NewRow()

newCustomersRow("CustomerID") = "ALFKI"
newCustomersRow("CompanyName") = "Alfreds Futterkiste"

DataSet1.Tables("Customers").Rows.Add(newCustomersRow)
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Fernando SotoConnect With a Mentor RetiredCommented:
YourDataAdopter.Update(DataSet1)

Where YourDataAdopter is the instance of the DataAdopter you used.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.