<!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>RE: [DUG] Data</TITLE>
</HEAD>
<BODY>
<!-- 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>

</BODY>
</HTML>