J
Justin Emlay
Just getting into ado.net and already hit a snag. No problems when using a
datgrid however now that I've moved on to textboxes I cant insert.
My form has 5 textboxes, an adaptor/connection/dataset. I simply want to
fill these out and create a new record from them. I've simplified my code
(hardcoded) to at least test the insert statement:
OleDbDataAdapter1.InsertCommand.CommandText = "INSERT INTO
Employee([Number]) VALUES (55555)"
OleDbDataAdapter1.Update(DsEmployee1)
I set the Insert Command and I Update. Seems like I'm missing something?
This doesn't even look right. So then I tried:
OleDbDataAdapter1.InsertCommand.CommandText = "INSERT INTO
Employee([Number]) VALUES (55555)"
OleDbDataAdapter1.InsertCommand.UpdatedRowSource = UpdateRowSource.Both
OleDbDataAdapter1.Update(DsEmployee1)
DsEmployee1.AcceptChanges()
Nada. Help!
Thanks,
Justin
datgrid however now that I've moved on to textboxes I cant insert.
My form has 5 textboxes, an adaptor/connection/dataset. I simply want to
fill these out and create a new record from them. I've simplified my code
(hardcoded) to at least test the insert statement:
OleDbDataAdapter1.InsertCommand.CommandText = "INSERT INTO
Employee([Number]) VALUES (55555)"
OleDbDataAdapter1.Update(DsEmployee1)
I set the Insert Command and I Update. Seems like I'm missing something?
This doesn't even look right. So then I tried:
OleDbDataAdapter1.InsertCommand.CommandText = "INSERT INTO
Employee([Number]) VALUES (55555)"
OleDbDataAdapter1.InsertCommand.UpdatedRowSource = UpdateRowSource.Both
OleDbDataAdapter1.Update(DsEmployee1)
DsEmployee1.AcceptChanges()
Nada. Help!
Thanks,
Justin