I'm trying to use the following code and it's giving me a big, big headache..

VB Code:
  1. Dim NewRow As DataRow = DS.Tables("Users").NewRow
  2.         NewRow!UserName = txtUserName.Text
  3.         NewRow!Password = txtPassword.Text
  4.         NewRow!Type = "User"
  5.         DS.Tables("Users").Rows.Add(NewRow)
  6.  
  7.         Dim CB As New OleDbCommandBuilder(DA)
  8.         DA.UpdateCommand = CB.GetUpdateCommand
  9.         DA.Update(DS, "Users")

This works just fine if i don't add the record

is there anything I need to do between adding the record and updating the thing? Thanks.


Squirrelly1