In addition to a Compile statement, stored procedures may include a contract block. The contract block improves the reliability and maintainability of your code by defining conditions that must be met before processing will begin, and before data is returned. Although not a requirement, using the contract block is often a good idea, especially when sharing code between multiple developers.

The contract block contains the following statements.

Begin Condition

Pre:

Post:

End Condition

Rules for contract blocks are as follows.

Note: If no conditions within the block are defined, your application is responsible for dealing with error conditions.