You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using 0001-01-01 (the minimum value for the DATE data type in SQL Server 2017) in some tables. Asserting table equals fails with the following error when this (or any value less than 1753-01-01 is present:
(Error) A .NET Framework error occurred during execution of user-defined routine or aggregate "Private":
System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
System.Data.SqlTypes.SqlTypeException:
at System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value)
at System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value)
at tSQLtCLR.tSQLtPrivate.getTableStringArray(SqlDataReader reader, SqlString PrintOnlyColumnNameAliasList)
at tSQLtCLR.tSQLtPrivate.TableToString(SqlString TableName, SqlString OrderOption, SqlString ColumnList)
.[16,1]{tSQLt.TableToText,8}
It seems that the whole thing fails when the table is serialize in tSQLt.TableToText when the assertion fails.
The text was updated successfully, but these errors were encountered:
Predhu
changed the title
tSQLt.AsserTableEquals fails when a DATE column has a value less than 1753-01-01
tSQLt.AssertEqualsTable fails when a DATE column has a value less than 1753-01-01
May 3, 2019
We are using 0001-01-01 (the minimum value for the DATE data type in SQL Server 2017) in some tables. Asserting table equals fails with the following error when this (or any value less than 1753-01-01 is present:
It seems that the whole thing fails when the table is serialize in tSQLt.TableToText when the assertion fails.
How to reproduce:
Environment:
The text was updated successfully, but these errors were encountered: