System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
2018-01-24
22:36 Closed ticket [a799e3978f]: Add support for DbType.DateTime2 parameter type plus 5 other changes artifact: 072514e4f1 user: mistachkin
19:53
Additions and corrections to the DbType mapping related lookup tables. Pursuant to ticket [a799e3978f]. check-in: 939cc5db59 user: mistachkin tags: trunk
19:07
Additions and corrections to the DbType mapping related lookup tables. Pursuant to ticket [a799e3978f]. Closed-Leaf check-in: d583659651 user: mistachkin tags: tkt-a799e3978f
18:48 Ticket [a799e3978f] Add support for DbType.DateTime2 parameter type status still Deferred with 3 other changes artifact: 5001c93fcc user: mistachkin
16:48 Ticket [a799e3978f]: 3 changes artifact: 14c3933d6e user: mistachkin
2018-01-14
21:58 Ticket [a799e3978f]: 3 changes artifact: 44b6d3debe user: anonymous
2014-08-25
19:43 Deferred ticket [a799e3978f]. artifact: e75c3655ce user: mistachkin
19:43 Ticket [a799e3978f]: 3 changes artifact: 8e0146766d user: mistachkin
19:43 Ticket [a799e3978f]: 3 changes artifact: aea6611eca user: mistachkin
10:04 Ticket [a799e3978f]: 3 changes artifact: 6ecea90824 user: anonymous
2014-01-16
13:19 Ticket [a799e3978f]: 5 changes artifact: 2b1928d46b user: mistachkin
11:38 New ticket [a799e3978f]. artifact: 9f25decaeb user: anonymous

Ticket Hash: a799e3978f6fa5a2ab333035cc4a5ba1ec5af48f
Title: Add support for DbType.DateTime2 parameter type
Status: Closed Type: Feature_Request
Severity: Important Priority: Medium
Subsystem: Convert Resolution: Fixed
Last Modified: 2018-01-24 22:36:54
Version Found In: 1.0.86.0
User Comments:
anonymous added on 2014-01-16 11:38:02:
To add compatibility with "DateTimeFormat", "DateTimeFormatString" and "DateTimeKind" options and to reflect the actual time precision supported by SQLite.

anonymous added on 2014-08-25 10:04:17:
Any chance to see this fixed?

anonymous added on 2018-01-14 21:58:47:
It seems like simply treating datetime2 as if it was datetime would save a lot of headaches. Is there a concern that this kind of change would break something else?

mistachkin added on 2018-01-24 16:48:06:
I've looked into adding this support before.  If I remember correctly, it would
be very difficult to maintain backward compatibility with existing databases and
their data types.

Further, DateTime2 appears to be SQL Server specific.

It should be noted that it is possible to customize the data type mappings used
by System.Data.SQLite on a per-connection basis.  That way, if a database schema
includes the type name DATETIME2, you should be able to map it to the DateTime2
DbType.  I'll try to add some tests to verify this is possible.

mistachkin added on 2018-01-24 18:48:21:
Confirmed.  Using the latest version of System.Data.SQLite, you can add a custom
type mapping for DATETIME2 that maps to the DbType DateTime using code similar to
the following:

  SQLiteConnection cnn = new SQLiteConnection("Data Source=:memory:;");
  cnn.Open();
  cnn.AddTypeMapping("DATETIME2", DbType.DateTime, false);