Hello,
I have a simple form that is used to delete records from a table based on the data entered by the end user and then they click on a Delete button.
The user enters the values for business, userid and last name and I have a process defined that will execute a ‘delete from’ command based on that information. The problem I'm having is that I get a successful message displayed whether I enter the correct information in the form….or bogus information (ie…no record in the table).
I was a bit perplexed as to why the form wouldn't have thrown an error when I entered data that does not match what's in the specific table (ie….data not found) ….but then realized that when submitting a delete command will just pass the results back regardless of whether or not it finds that specific record. If successful the delete command will return “1 rows deleted” and if it can't find a record to delete it will still be return successfully but it returns “0 rows deleted”.
So if the delete command returns zero records I want to display an ERROR or WARNING message on the screen instead of a SUCCESS message. Any suggestions on how this can be accomplished?
Thanks.