August 1999
Intermediate to advanced
1488 pages
72h 53m
English
database.commitTransaction()
The commitTransaction() method of the database object commits a new SQL transaction. This commits all the actions against the database since the last commit. If the commit is successful, 0 is returned. If a non-zero number is returned, an error was encountered. In this case, you can use the various methods of the database object to retrieve the code and message of the error.
Listing 8.39 creates a connection to an Oracle database. After the connection has been verified, the beginTransaction() method is called and a SQL query is performed. The results are formatted in a table with the SQLTable() method and written to the user's page.
Read now
Unlock full access