Search code examples
mysqlvb.nettableadapter

Tableadapter.Update not able to search a row to update


My database has a table that has no primary key and rows are identified as a combination of column values - Memeber_Id & Book_Id.

I want to update a third column in the table after identifying the row, but not sure how to do that. I want to use something like this-

TableAdapter.Update(Member_Id, Book_Id, New_Value_for_third_Column)

Please let me know if there is any solution to this. Thanks.


Solution

  • Hy, I had the same problem... I could solve it by adding a primary key to the table in the mySQL table.

    Also: Tableadapter.Update(YOUR DATASET.YOUR DATA TABLE)

    https://msdn.microsoft.com/en-us/library/z16c79x4(v=vs.110).aspx

    Hope it helps