Updating database record

  • Thread starter Thread starter William Gower
  • Start date Start date
W

William Gower

I am new to ADO.NET and have a question about updating

da.Fill(rsUser, "Users")

Dim tbl As DataTable = rsUser.Tables(0)
Dim Row As DataRow = rsUser.Tables(0).NewRow

Row("Name") = FullName.Text
....
....
....
....
rsUser.Tables("Users").Rows.Add(Row)

What's next to update the dataAdapter and thus the database?


da.Update(rsUser) ?????????????
 
DataAdapter.Update(Datatable)

this assume you have assigned an UpdateCoommand to your DataAdapter.
 
da.Update(rsUser, "Users")

You can also cut out a line of code if you want...from this code snippet,
doesn't look like tbl is doing anything.
 
Back
Top