Subject | RE: [IBO] row update problem |
---|---|
Author | Helen Borrie |
Post date | 2000-12-31T13:55:13Z |
At 08:31 AM 31-12-00 -0500, ed croxford wrote:
known. Datetimes are stored as doubles and there are often precision
problems trying to get a precise match - hence the problems you are
encountering when Delphi's representation of the double can't be matched
with the one stored in the database.
when the component relies on being able to get an exact match for a unique
value and the datatype selected cannot support such precision.
precision problem in different ways and Delphi handles them differently
again. All are approximations, close enough to convert correctly to date
strings for user interfaces but not suitable for uniques and keys.
You have probably dealt in the past with date types that were just dates,
stored as integers. Integers are perfect for using as PKs - hence Jason's
suggestion to replace the unreliable key with a stable surrogate.
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>thats absolutely ridiculous... are you sayingThe problems of using datetime datatypes as primary keys are well
>your stuff doesn't work... i've spent more
>hours than i'd like to deal with this..
known. Datetimes are stored as doubles and there are often precision
problems trying to get a precise match - hence the problems you are
encountering when Delphi's representation of the double can't be matched
with the one stored in the database.
>I thought i was dealing with a robust product here.You are dealing with a robust product. There is not much that can be done
when the component relies on being able to get an exact match for a unique
value and the datatype selected cannot support such precision.
>Please let me know.. since when can't you use a dateIt is a problem with datetime types. Different databases deal with the
>column as part of a unique key.. everyother piece of
>software seems to handle it.. or is this an interbase
>problem???
precision problem in different ways and Delphi handles them differently
again. All are approximations, close enough to convert correctly to date
strings for user interfaces but not suitable for uniques and keys.
You have probably dealt in the past with date types that were just dates,
stored as integers. Integers are perfect for using as PKs - hence Jason's
suggestion to replace the unreliable key with a stable surrogate.
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________