<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>SQL Update</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">We have a program which runs each a user starts system we have to check whether a program is the background is still running by checking through the server active programs list that you can see from Task manager. If the program find the background process is not running it reset a variable on an SQL table, so that the next user that logs in, without knowing, automatically start the program running again.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">We are having the occasional occurance of more than 1 copy of the background process running and have found that this variable that is being check is being reset to some process which we can't find what it is. A few people believe it is the checking program resetting this value when it does not think this process is running, when is actually is still running. We have check with SQL logs to find when the variable is being reset and have found when it is doing it, but it is only reseting one field, where we have the checking program update two fields on the record, one being a description, so we knew that this program was doing the resetting.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">The update of the SQL table is very simple:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">If SQL.Field1 = 1 then</FONT>
<BR><FONT SIZE=2 FACE="Arial">begin</FONT>
<BR> <FONT SIZE=2 FACE="Arial">SQL.Edit;</FONT>
<BR> <FONT SIZE=2 FACE="Arial">SQL.Field1 := 0;</FONT>
<BR> <FONT SIZE=2 FACE="Arial">SQL.Field2 :-= SQL.Feild2 + ' Reset';</FONT>
<BR> <FONT SIZE=2 FACE="Arial">SQL.Post;</FONT>
<BR><FONT SIZE=2 FACE="Arial">end;</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Does any think or know of any possible reason that if this logic is resetting the field1, that is would update field2 at the same time? When testing the log showed both fields being updated but running live only field1 is begin reset, so this is why I can't see this logic is causing our second copy of the background process to start running.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Regards</FONT>
<BR><FONT SIZE=2 FACE="Arial">Eion McIntosh</FONT>
<BR><FONT SIZE=2 FACE="Arial">PPCS Ltd</FONT>
</P>
</BODY>
</HTML>