If you are using a web based InfoPath form and on a submit, want to write to a database after validation. You may have a problem.
With the submit/save process, the validation is done at the very end, therefore if there’s a problem, such as a missing field, the form will have been saved with the data already written to a db.
To avoid this problem, in the submit process have a Rule to check fields and if they all meet a set criteria, then set a field to SubmitReady to True,
then in other Rules, only run them if SubmitReady is True.
Pretty simple ready