Using the DataWindow Transaction Object control

What it does

The DataWindow Transaction Object control allows you to establish a database connection independent of the Web ActiveX. It is similar to the PowerBuilder Transaction object.

Internal transaction management or separate Transaction object

Both the Web ActiveX control and the Transaction Object control can establish a database connection. The one you use depends on your needs.

There are two main reasons to use the Transaction Object control:

If you have only one control and are simply retrieving data, you do not need either of these features. Instead of instantiating a separate control, you can set the connection properties of the Web ActiveX itself and allow it to connect and disconnect for each database access.

Status and error information

The Transaction Object control receives status information from the database. You can test the success or failure of a database operation and get status information with these methods, which are equivalent to PowerBuilder transaction object properties:

Hiding the Transaction Object control

The Transaction Object control has no visual aspect, but if it is in the BODY section of the Web page, it still takes up space. You can set its HEIGHT and WIDTH attributes to very small values or use stylesheet settings to make it invisible.

For information on setting properties for making a database connection, see “Making database connections”.