[fpc-devel] DB Bug in 2.0.1?

Michael Van Canneyt michael at freepascal.org
Thu Jul 21 06:51:12 CEST 2005



On Thu, 21 Jul 2005, Joost van der Sluis wrote:

> 
> > I tried building this app with 2.0.1 from July 5th (and again from 
> > today's 2.0.1 snapshot) of FPC and all date fields are reading as 
> > "12/31/0000" when read as both a string and as a TDateTime.  I use the 
> > same download of TDbf in both, not the TDbf that's packaged with FPC.
> 
> > This happens both in code and within data aware components.
> 
> It's an known issue. There was some discussion about which format to use
> internally for date/time-fields. That the Delphi help stated that
> TDateTime should be used was not accepted as an argument then, so it's
> changed to something else.
> 
> Now I did some tests and I know that Delphi 7 uses TDateTime internally,
> so it'll be changed back to that. I have the patches ready, but need to
> do more tests with all supported databases.

Because of the bug report I did some research on this as well.
Up to and including D4, a TDateTimeRec was used internally.
As of Delphi 5, TDateTime was used.

Since the first FPC TDataset implementation was based on a D3 spec, 
this explains the confusion.


> 
> At the same time I discovered some bugs in the rtl regarding
> TDateTime's, i'll send a fix for that too. I think it all will be done
> in the weekend.

Send me the fix if you want.

Michael.




More information about the fpc-devel mailing list