Posts

Showing posts with the label consistent

Dealing with Consistency Errors

Image
NAV's consistency function is seldom used but very valuable when you need it.  Simply put, it ensures logical integrity at the transaction level.  This means that when a transaction is committed, it has followed any business logic that you wish to enforce .   That last part is important.  It is up to the developer to determine which conditions make a transaction consistent and then set the consistency flag at an appropriate spot in the code.  The use of this function does have one major drawback: it is anywhere from difficult to impossible to track down the source of a consistency error using the debugger.  Because the source of a consistency error depends on what may or may not have happened during the course of the transaction, the best way to figure out what went wrong is to look at the data that got generated at the state it was in right before the commit. If only there was a way to do this... Step 1: Create a debugging instance. First, crea...