Breaking Change T1251731
Visible to All Users

XPO - Changed column mappings for SQL types Date and Time

What Changed

In v24.2, we supported DateOnly and TimeOnly .NET types for the following XPO database providers:

  • MSSQL
  • PostgreSQL
  • Oracle
  • MySql
  • Firebird
  • SQLite

Previously, columns of tables that had the date and time SQL types were mapped to the DateTime .NET type by default.

Reasons for Change

XPO is used in SqlDataSource - the most popular data source in Reports and Dashboards. We enhanced its functionality by supporting DateOnly and TimeOnly properties.

Impact on Existing Apps

If your code has persistent classes with persistent properties mapped to table columns with SQL types date or time, you may get type conversion errors when storing and loading the data.
If your code uses the GetStorageTables() or GetTableSchema() methods to get the data tables schema, then the columns with the SQL types date and time are mapped to DBColumnType.DateOnly and DBColumnType.TimeOnly instead of DBColumnType.DateTime.

How to Revert to Previous Behavior

Add the following line of code before you execute data operations to revert mapping of date and time SQL types to the DateTime .NET type:

ConnectionProviderSql.GlobalUseLegacyDateOnlyAndTimeOnlySupport = true;

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.