database.beginTransaction() (Method)

Marks the beginning of a transaction with the database.

Availability:

JavaScript - 1.1
Netscape Enterprise Server - 2.0
Property/method value type:Number primitive
JavaScript syntax:NESdatabase.beginTransaction()

This commences a transaction on the database. The transaction methods are useful if you want to maintain control over the two phase commit process in the database. The alternative database.execute() method can accomplish the same but it will automatically commit any changes as the SQL is executed. This transaction based technique provides a finer degree of control and allows for rollbacks.

Refer to the Status Code topic for a list of the status code values that are returned by this method.

See also:database.commitTransaction(), database.rollbackTransaction(), Status code