You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most important question from this: if we can't preserve a fractional time at all, should you get an error the way you would if you tried to store an out of range number? Should you have to round it yourself?
Anyway... from a "transferring values as bytes" standpoint, there's not much that can be done with this and the TIME type in ODBC. Because the structure you use just doesn't have fractional time:
The workaround would be to read and write the times textually. Someone on the Firebird bug tracker tried that--or at least tried the reading part. It executed, but gave the wrong fractions. Discussion on the bug suggests the issue was then fixed (in 2016's version of the ODBC driver, 2.0.4).
I'm marking it low priority, but it could be done. In the meantime, clients can do this themselves for servers that support it, by using SQL statements that do the stringification.
Note: While there's no space for fraction in TIME, there is space for it in the TIMESTAMP's transfer struct:
But in the cases I looked at for TIMESTAMP it seems to be thrown away. Perhaps one would have better luck with DATETIME which seems to be larger in some cases.
hostilefork
changed the title
Loss of fractional time ODBC
Loss of fractional time when writing TIME columns
Oct 10, 2019
via @gchiu:
The text was updated successfully, but these errors were encountered: