To implement the scenario for this section, you will build the UpdateReceipt component. You will also modify the Receipt component's Update method to use UpdateReceipt. Update adds 100 to the maximum receipt value stored in the database.
Click here to see the Update method
You also need to add code to the GetNextReciept method of the Receipt component to check whether the maximum receipt value has been reached. If so, the Update method is called.
Click here to see the GetNextReceipt method
To create the UpdateReceipt component
By adding a new class module, you add a new COM component to this DLL. Therefore, you need to delete the existing components in the Microsoft Transaction Server Explorer and then install the new components.
To reinstall your components
To set the transaction attributes for your components
The code you added here is similar to the code you added in "Building Transactional Components." However, choosing Requires a new transaction causes the UpdateReceipt component to run in a new transaction. The next section discusses how this affects application behavior.
See Also
Transactions, Transaction Attributes