Hi all and especially Michael,

Date and time fields are broken in Sqldb at this moment. So I've looked
at revision 1853 and saw a few new incosistencies.

In sqldb.pp you add the comment that all datatypes are already in
Nativeformat, so they don't have to be converted. 
But in fact, in sqldb all databuffers are NOT in the nativeformat.

As far as I understood it: you never want to use Nativeformat(=true)

That's with the following definition of NativeFormat:
When nativeformat is true, no conversion from the data takes place, so
that the format is returned in the format that is used by the underlying
database.

Thus, in the case of an Oracle database, when NativeFormat is true
you'll get the 7-byte oracle db-format.

Which is of no use at all, since the TField descendents can't handle
that format.

Only if you do something like a data-pump, you use Nativeformat=True,
for speed-issues.

That said, the whole NativeFormat property is useless, and that's why I
(we?) want(ed) to have it removed. It's only there for backwards-
compatibility with programs that call GetData(xx,False). (GetData
(xx,True) is hardly ever used)

But with your patch you re-implemented the use of NativeFormat in the
Fields-unit. And I was just so happy that it was removed.

Now I don't get at all what you meant by the conversion from date/time
fields when nativeformat is true or false. 

But is this a solution: rollback/undo revision 1853.

Then add a protected property to TDataset:
TDataset.UseTDateTimeInternally. And set that to false by default.

Then we can add UseTDateTimeInternally:= True to all Tdataset
descendents creator's that uses the 'fpc-tdatetime-system'

Then we can do the conversion to TDateTime in GetfieldData if
UseTDateTimeInternally = false.

Is that an idea?

We have to do something, since sqldb is severely broken atm...

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to