Table Adaptor Error when trying update
        Posted  
        
            by 
                JasonMc92
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by JasonMc92
        
        
        
        Published on 2011-01-17T04:04:33Z
        Indexed on 
            2011/01/17
            5:53 UTC
        
        
        Read the original article
        Hit count: 242
        
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.
© Stack Overflow or respective owner