L
latin & geek via DotNetMonster.com
hi.
im at wits end! my update command isnt working properly. im able to edit and
delete data successfully with the same command builder, but when i add a new
row and update, i get an "affected zero records" message.
Dim cb2 As New OleDb.OleDbCommandBuilder(da2)
dv.AllowNew = False
gnrow = ds.Tables("exp").NewRow()
ds.Tables("exp").Rows.Add(gnrow)
da2.Update(ds, "exp")
max1 = ds.Tables("exp").Rows.Count
'assigning the new record to the open employee record
ds.Tables("exp").Rows(max1 - 1).Item("emp") = wonly1
da2.Update(ds, "exp") ------------------>
this is where the program seizes up.
will someone please tell me what to do to fix it?
im at wits end! my update command isnt working properly. im able to edit and
delete data successfully with the same command builder, but when i add a new
row and update, i get an "affected zero records" message.
Dim cb2 As New OleDb.OleDbCommandBuilder(da2)
dv.AllowNew = False
gnrow = ds.Tables("exp").NewRow()
ds.Tables("exp").Rows.Add(gnrow)
da2.Update(ds, "exp")
max1 = ds.Tables("exp").Rows.Count
'assigning the new record to the open employee record
ds.Tables("exp").Rows(max1 - 1).Item("emp") = wonly1
da2.Update(ds, "exp") ------------------>
this is where the program seizes up.
will someone please tell me what to do to fix it?