Hello guys, I have MySQL database and can retrieve and connect to the database and update with query but cannot update the database directly from the datagridview.
getting the table to datagridview....
Code:
Try
            Connection.Open()
            Database_Command = New MySqlCommand
            Database_Command.CommandText = "SELECT * FROM `" & Table_Name & "`"
            Database_Adapter = New MySqlDataAdapter(Database_Command.CommandText, Connection)
            Users_Table_Command_Builder = New MySqlCommandBuilder(Database_Adapter)
            Users_Table_Table = New DataTable
            Users_Table_Table.Locale = System.Globalization.CultureInfo.InvariantCulture
            Database_Adapter.Fill(Users_Table_Table)
            Users_Table_Binding_Source = New BindingSource
            Users_Table_Binding_Source.SuspendBinding()
            Users_Table_Binding_Source.DataSource = Users_Table_Table
            Table.DataSource = Users_Table_Table
            Users_Table_Binding_Source.ResumeBinding()
            Connection.Close()
        Catch ex As Exception
        End Try
update code LoL
Code:
Try
            Database_Adapter.Update(Users_Table_Table)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
And the update command is giving me this error
Name:  Untitled.png
Views: 169
Size:  18.9 KB