[DUG] Data
Eion McIntosh (Christchurch)
e.mcIntosh at ppcs.co.nz
Tue Nov 29 09:08:57 NZDT 2005
Hi
I have found my issue but it has raised another issue I've have over the years and could not figure out.
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.
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.
Why should it be doing this????
Regards
Eion McIntosh
PPCS Ltd
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz
[mailto:delphi-bounces at ns3.123.co.nz]On Behalf Of Mark Howard
Sent: Friday, November 25, 2005 5:22 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Data
Eion
Sorry this is not a very technical response but.....
Is it always the same 300 records that are missing?
if so
finding out what is common with those 300 records and different from the records actually returned, may give you a clue.
Are they the last 300 (matching) records posted to the database?
Are they the last records returned (in the Dev system dataset)?
Mark
On Fri, 25 Nov 2005 16:54:26 +1300, Eion McIntosh (Christchurch) <e.mcIntosh at ppcs.co.nz> wrote:
> Hi
>
> We have two copies of a system. A development version and a live version. The live version is running under a terminalsservices session.
> 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.
> When running the version from the development PC the queries is returning the correct results even when pointing to the live database.
> Running the live version, via the terminal services session, it appears to be not including about 300 records.
> 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.
>
> Any thoughts?
>
> Regards
> Eion McIntosh
> PPCS Ltd
>
>
--
Forest Production Systems Ltd
Creators of PSLog - A harvesting information system
www.pslog.co.nz
Skype: markhoward
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.7/181 - Release Date: 24/11/2005
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20051129/293ca00b/attachment-0001.html
More information about the Delphi
mailing list