Thanks Max,

I knew it had to be something like that. I even had a look at the source
code for the TDateTime but have not had enough to do with date and time
formats to realise what was going on.
There's no way around it then. I will have to do a check to see what type
of data is being read in and use GetData for everything (that I support)
except ftDate, ftTime, and ftDateTime.

Phil.



From: "Max Nilson" <[EMAIL PROTECTED]> AT tawa on 10/07/99 16:32 ZE12

To:   Multiple recipients of list delphi <[EMAIL PROTECTED]> AT
      tawa@kauripo@CCMAIL
cc:    (bcc: Phillip Middlemiss/NZ Forest Research Institute/NZ)
Subject:  RE: [DUG]: Error copying TDateTime using TField.GetData




> All I really need to know is why the GetData() method of TField
> is placing funny information in my buffer.

Your problem is that date and time fields are stored internally in a
somewhat perverse Paradox format. Your must convert from the internal
format into a TDataSet as shown by the TDateTimeField.GetValue code in
DB.pas (line 4356 in the Delphi 4 source). The really annoying thing is
that if you are writing TDataSet taking data from some othe source (eg
Interbase) you have to convert the native data format into the wierd
Paradox internal format so that the TDateTime field can convert it into a
TDateTime. Sigh.

Cheers, Max.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz







---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to