<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"
xmlns:ns0="http://schemas.microsoft.com/office/2004/12/omml">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
a:link
        {mso-style-priority:99;}
span.MSOHYPERLINK
        {mso-style-priority:99;}
a:visited
        {mso-style-priority:99;}
span.MSOHYPERLINKFOLLOWED
        {mso-style-priority:99;}
p
        {mso-style-priority:99;}
pre
        {mso-style-priority:99;}
p.MSOACETATE
        {mso-style-priority:99;}
li.MSOACETATE
        {mso-style-priority:99;}
div.MSOACETATE
        {mso-style-priority:99;}
span.HTMLPREFORMATTEDCHAR
        {mso-style-priority:99;}
span.BALLOONTEXTCHAR
        {mso-style-priority:99;}
..MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:Tahoma;
        color:black;}
p.TableHeading, li.TableHeading, div.TableHeading
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;
        font-weight:bold;}
span.HTMLPreformattedChar
        {font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {font-family:Tahoma;
        color:black;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:Calibri;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-GB link=blue vlink=purple id=MailContainerBody
leftmargin=0 topmargin=0 CanvasTabStop=true name="Compose message area">
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
lang=EN-NZ style='font-size:12.0pt;color:navy'>I see what your problem may be :
</span></font><font color=black><span lang=EN-NZ style='color:windowtext'> </span></font><font
color=navy><span lang=EN-NZ style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 color=black face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:windowtext'>Within each
transaction the program fires the generator once for ID for one table, and once
for each line ID of the other table, and writes one line to a log
file after the transaction commits. The generator is being
fired separately for the occasional duplicate transactions (ie they have
different ID's even though other fields are the same) yet only one line
appears in the log file. Hence the mystery!</span></font><font
color=black><span lang=EN-NZ style='color:windowtext'><o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
lang=EN-NZ style='font-size:12.0pt;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'>The generator is NOT
under transaction control, but all of the other stuff is.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'>So if you try and insert,
and something causes your transaction to be rolled back and resubmitted, the
generator will be incremented twice.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'>Several types of data
abstraction layer will do a retry (with a new transaction) under certain
conflict situations.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'>If you want to get a database
log to also run outside transaction control, use an external table.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-NZ
style='font-size:10.0pt;font-family:Arial;color:navy'>Trevor<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
lang=EN-NZ style='font-size:12.0pt;color:windowtext'> <o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>