the same trick does not work with SQL Server.
according to the SQL server doc's the column type datetime(2) can support a fractional second precision up to 7 digits. And according to some other doc-page, SQL server supports ISO 8601 compliant date-time literals: http://msdn.microsoft.com/en-us/library/bb677335.aspx
I've tested this in the SQL Server Management Studio the following query works-column data type is datetime2(6):
Code: Select all
insert into [Test]
values
('2014-08-08T14:31:11.12345')
- FAIL: Sender.PutColumnData(0, I, '01-01-2010T01:00:00');
- FAIL: Sender.PutColumnData(0, I, '01-01-2010 01:00:00.123');
- this is okay: Sender.PutColumnData(0, I, '01-01-2010 01:00:00');
I'm using version 5.3.9 and SQL Server 2014.