Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

Mapping of c-treeACE SQL ADO.NET Data Provider Time Fields

The c-treeACE SQL Time type (c-tree CT_TIME) was originally mapped to a .NET DateTime type based on the lack of a Time class in the .NET CLR and that a c-treeACE SQL Time value was best represented by a DateTime class due to the point-in-time nature of the pair. It was noted that Microsoft mapped ODBC Time types to TimeSpan in .NET and SQL Server 2008 introduced a Time type that also mapped to this class. c-treeACE SQL Time is now mapped to a .NET TimeSpan type to better align with the Microsoft chosen mapping.

This is a compatibility change to be noted in migrating c-treeACE SQL ADO.NET Provider applications to c-treeACE SQL V9.3.

Note: The .NET TimeSpan class allows negative values which are not valid c-treeACE SQL time values. An attempt to update a database Time value based on a negative TimeSpan will result in an overflow/underflow error and proper handling of this exception should be taken.

TOCIndex