hi im using the code below to try and add a new user name and password to a access table but when i debug the program it says that there is a syntax error in the insert into statment at the da.Update(ds, "un") statment
Private Sub ButtOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtOK.Click
If inc <> 1 Then
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables("un").NewRow()
dsNewRow.Item("username") = username.Text
dsNewRow.Item("Password") = password.Text
ds.Tables("un").Rows.Add(dsNewRow)
da.Update(ds, "un")
MsgBox("New Record added to the Database")
End If
Private Sub ButtOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtOK.Click
If inc <> 1 Then
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables("un").NewRow()
dsNewRow.Item("username") = username.Text
dsNewRow.Item("Password") = password.Text
ds.Tables("un").Rows.Add(dsNewRow)
da.Update(ds, "un")
MsgBox("New Record added to the Database")
End If