<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=056483020-28112005>As a 
newbie I struck this kind of variablilty the moment I started to process dates, 
so I just switched to using only FormatDateTime - no way I wanted to be at the 
mercy of system settings so I specify the format in the 
code.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=056483020-28112005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=056483020-28112005>Alphadate:=FormatDateTime('dd-mmm-yy',date);</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=056483020-28112005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=056483020-28112005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV class=Section1>
<P class=MsoAutoSig align=left>John<SPAN class=056483020-28112005><FONT 
face=Arial color=#0000ff size=2>&nbsp;</FONT></SPAN></P>
<P class=MsoAutoSig align=left><SPAN class=056483020-28112005><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</P>
<P class=MsoAutoSig align=left><SPAN class=056483020-28112005>&nbsp;</SPAN><FONT 
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
delphi-bounces@ns3.123.co.nz [mailto:delphi-bounces@ns3.123.co.nz] <B>On Behalf 
Of </B>Eion McIntosh (Christchurch)<BR><B>Sent:</B> Tuesday, 29 November 2005 
9:09 a.m.<BR><B>To:</B> NZ Borland Developers Group - Delphi 
List<BR><B>Subject:</B> RE: [DUG] Data<BR><BR></P></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><!-- Converted from text/plain format -->
  <P><FONT size=2>Hi</FONT> </P>
  <P><FONT size=2>I have found my issue but it has raised another issue I've 
  have over the years and could not figure out. </FONT><BR><FONT size=2>The 
  process that was running was trying to extract out the month from a date. 
  Instead of using monthof function, for some reason we were finding using the 
  strtoint(copy(datetostr(DATE))) function. Now my PC Regional settings date 
  setting is dd/mm/yyyy where the server, running the terminal server session, 
  has it set to d/mm/yyyy. When the program starts we make sure that we set the 
  format to the one we want by doing shortdateformat := 'dd/mm/yyyy'. This is 
  obviously not having any affect and is remaining as d/mm/yyyy because the 
  records that were being missed were for days 1-9 of each month as they were 
  formated as 1/11/2005 and not 01/11/2005 so when we tried doing 
  strtoint(copy(datetostr('1/12/2005'),4,2)) we were getting as '2/' and failing 
  the conversion, which we had trapped for. </FONT></P>
  <P><FONT size=2>Now I have identified the problem, the really strange issue is 
  that I've found that if I display the shortdateformat in a message, as the 
  program starts, in the screens Formcreate procedure, to confirm the date 
  format of the server, it shows the server set as d/mm/yyyy but the date issue 
  then works correctly. I then took out the message again and it went wrong 
  again.</FONT></P>
  <P><FONT size=2>Why should it be doing this????</FONT> </P>
  <P><FONT size=2>Regards</FONT> <BR><FONT size=2>Eion McIntosh</FONT> <BR><FONT 
  size=2>PPCS Ltd</FONT> </P><BR>
  <P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: 
  delphi-bounces@ns3.123.co.nz</FONT> <BR><FONT size=2>[<A 
  href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</A>]On 
  Behalf Of Mark Howard</FONT> <BR><FONT size=2>Sent: Friday, November 25, 2005 
  5:22 PM</FONT> <BR><FONT size=2>To: NZ Borland Developers Group - Delphi 
  List</FONT> <BR><FONT size=2>Subject: Re: [DUG] Data</FONT> </P><BR>
  <P><FONT size=2>Eion</FONT> </P>
  <P><FONT size=2>Sorry this is not a very technical response but.....</FONT> 
  <BR><FONT size=2>Is it always the same 300 records that are missing?</FONT> 
  <BR><FONT size=2>if so</FONT> <BR><FONT size=2>finding out what is common with 
  those 300 records and different from the records actually returned, may give 
  you a clue.</FONT></P>
  <P><FONT size=2>Are they the last 300 (matching) records posted to the 
  database?</FONT> <BR><FONT size=2>Are they the last records returned (in the 
  Dev system dataset)?</FONT> </P>
  <P><FONT size=2>Mark</FONT> </P>
  <P><FONT size=2>On Fri, 25 Nov 2005 16:54:26 +1300, Eion McIntosh 
  (Christchurch) &lt;e.mcIntosh@ppcs.co.nz&gt; wrote:</FONT> </P>
  <P><FONT size=2>&gt; Hi</FONT> <BR><FONT size=2>&gt;</FONT> <BR><FONT 
  size=2>&gt; We have two copies of a system. A development version and a live 
  version. The live version is running under a terminalsservices 
  session.</FONT></P>
  <P><FONT size=2>&gt; A database query creates some total figures by month. 
  Running the same query using the same data and the same version of the program 
  between the development and live versions is returning different 
  results.</FONT></P>
  <P><FONT size=2>&gt; When running the version from the development PC the 
  queries is returning the correct results even when pointing to the live 
  database.</FONT></P>
  <P><FONT size=2>&gt; Running the live version, via the terminal services 
  session, it appears to be not including about 300 records.</FONT> <BR><FONT 
  size=2>&gt; Both versions indicate they will be processing the same number of 
  records, 1404, and the same procedure is being used everytime to start the 
  queries. i.e. Once the program is started running the query is the first thing 
  that occurs, so there can be no other background filtered or anything previous 
  set up data which could be influencing the queries.</FONT></P>
  <P><FONT size=2>&gt;</FONT> <BR><FONT size=2>&gt; Any thoughts?</FONT> 
  <BR><FONT size=2>&gt;</FONT> <BR><FONT size=2>&gt; Regards</FONT> <BR><FONT 
  size=2>&gt; Eion McIntosh</FONT> <BR><FONT size=2>&gt; PPCS Ltd</FONT> 
  <BR><FONT size=2>&gt;</FONT> <BR><FONT size=2>&gt;</FONT> </P><BR><BR>
  <P><FONT size=2>-- </FONT><BR><FONT size=2>Forest Production Systems 
  Ltd</FONT> <BR><FONT size=2>Creators of PSLog - A harvesting information 
  system</FONT> <BR><FONT size=2>www.pslog.co.nz</FONT> <BR><FONT size=2>Skype: 
  markhoward</FONT> </P><BR>
  <P><FONT size=2>-- </FONT><BR><FONT size=2>No virus found in this outgoing 
  message.</FONT> <BR><FONT size=2>Checked by AVG Free Edition.</FONT> <BR><FONT 
  size=2>Version: 7.1.362 / Virus Database: 267.13.7/181 - Release Date: 
  24/11/2005</FONT> </P>
  <P><FONT size=2>_______________________________________________</FONT> 
  <BR><FONT size=2>Delphi mailing list</FONT> <BR><FONT 
  size=2>Delphi@ns3.123.co.nz</FONT> <BR><FONT size=2><A 
  href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</A></FONT> 
  </P></BLOCKQUOTE></BODY></HTML>