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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top