Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
Locating on a timestamp field |
Sat, Jul 25 2009 7:57 PM | Permanent Link |
Jeff Dunlop | I have two tables with a timestamp field. I copy the timestamp from one table to the
other, and then try to locate the record in the 2nd table by the timestamp in the first. If the timestamp value has a millisecond value, the locate always fails. If I delete the millisecond value, the locate always succeeds. Even if I directly edit both records and type in a millisecond value of say 1, then it fails again. Any ideas on why a locate should fail only in this case? |
Sat, Jul 25 2009 8:15 PM | Permanent Link |
Jeff Dunlop | It appears to be an issue with TClientDataSet. Locating against a sensitive
query is fine. |
Sun, Jul 26 2009 4:16 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jeff
What happens if you try to select for a range say +- 5 ms Roy Lambert |
Mon, Jul 27 2009 4:58 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jeff,
<< It appears to be an issue with TClientDataSet. Locating against a sensitive query is fine. >> Are you calling Locate on the TClientDataset, or the base EDB query used to retrieve the TClientDataset rows ? -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Jul 28 2009 10:07 PM | Permanent Link |
Jeff Dunlop | The CDS. I don't interfere with the query hanging off the provider. No I didn't attempt a
range. I'm aware of floating point rounding, but I don't believe that would apply in a case where the identical value is copied from one field to another. "Tim Young [Elevate Software]" wrote: Jeff, << It appears to be an issue with TClientDataSet. Locating against a sensitive query is fine. >> Are you calling Locate on the TClientDataset, or the base EDB query used to retrieve the TClientDataset rows ? -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jul 29 2009 12:17 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jeff,
<< The CDS. >> In that case the Locate is implemented at the CDS level and doesn't actually apply to EDB at all. << I'm aware of floating point rounding, but I don't believe that would apply in a case where the identical value is copied from one field to another. >> Yes, you are correct - only when performing an operation like multiplication or division do you start to see issues like that. However, you also have to understand that the conversion from TDateTimes to internal representations, or vice-versa, can cause multiplication or division to occur, and that can result in such issues. With the CDS and a lot of TDataSet descendants, the default TDataSet.DataConvert method uses the MSecsToTimeStamp and TimeStampToMSecs functions to convert TDateTimes (floats) to two integers, one for the date (days) and one for the time (msecs). -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |