In a DataWindow database connection, a Transaction object is a nonvisual object that functions as the communications area between the DataWindow and the database. The Transaction object specifies the parameters that the DataWindow server uses to connect to a database. You must establish the Transaction object before you can access the database from your application.
If you are using a Transaction object, you take the following general steps:
Create a Transaction object.
Set its properties.
Connect to the database.
Assign the Transaction object to a DataWindowControl, WebDataWindowControl, or DataStore and perform database processing.
Disconnect from the database.
Exception handling
The sample code in the following sections is simplified for
brevity. You would usually wrap your code with try-catch statements
to ensure that attempts to modify the database succeeded before
committing the transaction. For more information, see “Exception handling”.