Overview
Artifact ID: | e3631f103c8c1e24d0979c2d97fd5c861e2788b9 |
---|---|
Ticket: | bb4b04d4578f017ea01ef094a2177687566f7bba
Using DateTimeFormat=Ticks with TIMESTAMP column causes exception |
User & Date: | mistachkin 2013-01-01 19:32:26 |
Changes
- comment changed to:
I have database with table like this CREATE TABLE Times (Time TIMESTAMP NOT NULL) In connection string I have the option datetimeformat=Ticks When reading field Times with SQLiteDataReader and trying to convert it in into DateTime type, exception "Invalid typecast" is thrown because returned value has "long" type. In version 1.0.74 and earlier the type was correct - DateTime. If I'll change declaration of field in database to DATETIME, then all go OK. Example code http://pastebin.com/aQjUe1tV When linked to 1.0.74 it shows the correct date, but when linked to 1.0.76+, program closes with exception <hr /><i>mistachkin added on 2011-11-29 22:33:31 UTC:</i><br /> For now, the best workaround is to use the DATETIME column type instead of TIMESTAMP? <hr /><i>mistachkin added on 2011-11-30 00:36:19 UTC:</i><br /> Fixed by check-in [e96f0d17a5] on trunk.
- login: "mistachkin"
- mimetype: "text/x-fossil-plain"
- status changed to: "Closed"