Subject RE: [IBO] row update problem
Author Helen Borrie
At 08:31 AM 31-12-00 -0500, ed croxford wrote:
>thats absolutely ridiculous... are you saying
>your stuff doesn't work... i've spent more
>hours than i'd like to deal with this..

The problems of using datetime datatypes as primary keys are well
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 date
>column as part of a unique key.. everyother piece of
>software seems to handle it.. or is this an interbase

It is a problem with datetime types. Different databases deal with the
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.


All for Open and Open for All
InterBase Developer Initiative ยท