Table Adaptor Error when trying update
- by JasonMc92
Hi, I have a rather perplexing issue. I am using VB.net and SQL for my project.
I have a database, to which the connection works. I also have a data table and data adaptor, both of which I know work.
I am trying to update something in the database, yet it isn't working. Assume everything listed is declared correctly. What am I doing wrong?
teacher_control_table.Rows(0)("DATA_TeacherLockPasscode") = txtPasscode1.Text
table_adaptor2.Update(teacher_control_table)
That last line throws the following exception:
InvalidOperationException was unhandled. update requires a valid UpdateCommand when passed DataRow collection with modified rows.