I have a Winforms application that uses a SQL Server database. I have a documents table and a files table.
The application gets the information of a file and saves it as a row in the documents table and then it opens a browser to save the file. The file path is then saved in the files table which is linked to the documents table.
Now what I want to do is that if the person didn't choose a file or for whatever reason their file is not qualified, it not only shows a message but it also deletes the row for which no file is chosen/saved.
I checked a couple of answers about "deleting a row in a SQL Server table from a Winforms application (like this Data Table + delete a row in c# using loop)" but it is not quite what I need.
Can anyone help?