61 lines
4.0 KiB
HTML
61 lines
4.0 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="Trigger and application programs that are under commitment control" />
|
|
<meta name="abstract" content="This topic describes the conditions when trigger and application programs are under commitment control." />
|
|
<meta name="description" content="This topic describes the conditions when trigger and application programs are under commitment control." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahftrb2.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbaforzahftrf" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Trigger and application programs that are under commitment control</title>
|
|
</head>
|
|
<body id="rbaforzahftrf"><a name="rbaforzahftrf"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Trigger and application programs that are under commitment control</h1>
|
|
<div><p>This topic describes the conditions when trigger and application
|
|
programs are under commitment control.</p>
|
|
<p>When the trigger program and the application program run under the same
|
|
commitment definition, a failure of the trigger program causes the rollback
|
|
of all statements that are associated with the trigger program. This includes
|
|
any statement in a nested trigger program. The originating change operation
|
|
also rolls back. This requires the trigger program to signal an exception
|
|
when it encounters an error.</p>
|
|
<p>When the trigger program and the application program run under different
|
|
commitment definitions, the COMMIT statements in the application program only
|
|
affect its own commitment definition. The programmer must commit the changes
|
|
in the trigger program by issuing the COMMIT statement.</p>
|
|
<p>When insert or update record operations are performed under commitment
|
|
control, the detection of any specific duplicate key errors is deferred until
|
|
the logical end of the operation, to allow for the possibility that such errors
|
|
have been resolved by that time. In the case of a trigger program running
|
|
in the same commitment definition as its calling program, the logical end
|
|
of the operation occurs after the single or blocked insert, update, or delete
|
|
record operation is performed by the calling program, and control returns
|
|
from any called before or after trigger programs. As a result, duplicate key
|
|
errors are not detectable in trigger programs that use the same commitment
|
|
definition as the insert, update, or delete record operation that called the
|
|
trigger programs.</p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbaforzahftrb2.htm" title="These topics discuss recommendations, precautions, and error messages for trigger programs. Information about monitoring and commitment control is also included.">Other important information about working with triggers</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |