The SDAC Delphi DateTime is only accurate to a millisecond.
If a new datetime2(7) column is a part of a key, a record can't be deleted since the DateTime SDAC sends to SQL isn't accurate enough
Here is SDAC trying to delete my Notes record
exec sp_executesql N'DELETE FROM dbo.PurchaseOrderLineNotes
WHERE
pohID = @P1 AND polLineNo = @P2 AND polntID = @P3 AND polnCreatedOn = @P4',N'@P1 int,
@P2 int,@P3 smallint,@P4 datetime2(7)',124,2,2,'2009-12-02 18:00:15.7430000'
And here is the CreatedOn from then record from the Management studio
2009-12-02 18:00:15.7430449
Please support SDAC being fully compliant with datetime2 data type.
SDAC does not fully support SQL 2008 datetime2
Delphi/DateTime2
Hi,
So really there's no simple solution other than to explicitly state it's a datetime field or use cast/convert
So really there's no simple solution other than to explicitly state it's a datetime field or use cast/convert