Hi I am working i C# window form and mySQL database, I was able to connect to the database, retrieve data and display it in DataGridView.
Now if user click to a row in the DataGridView and press Delete button, I want that selected row to be deleted in database.
Problem is I need to know which column(s) is primary key(s) in order to delete it from database by using this SQL query:
DELETE FROM (selected table) WHERE (Primary column's name(s) = value(s) of primary key column(s) of selected row)
the Bold part is where I am stuck at, can some body help me out or know how other way to delete the selected row in database?