Skip to content

Commit efafac1

Browse files
committed
Fix ODBC
System.Data.Odbc.OdbcException : ERROR [22007] [Microsoft][SQL Server Native Client 11.0][SQL Server]The conversion of a date data type to a datetime data type resulted in an out-of-range value.
1 parent f5f2613 commit efafac1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/NHibernate.Test/Async/Hql/HQLFunctions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ public async Task ConcatAnsiFirstParamAsync()
11531153
using (ISession s = OpenSession())
11541154
using (var t = s.BeginTransaction())
11551155
{
1156-
var a1 = new Human { NickName = nickName };
1156+
var a1 = new Human { NickName = nickName, Birthdate = DateTime.Today };
11571157
await (s.SaveAsync(a1));
11581158
await (t.CommitAsync());
11591159
}
@@ -1180,7 +1180,7 @@ public async Task ConcatAnsiSecondParamAsync()
11801180
using (ISession s = OpenSession())
11811181
using (var t = s.BeginTransaction())
11821182
{
1183-
var a1 = new Human { NickName = nickName };
1183+
var a1 = new Human { NickName = nickName, Birthdate = DateTime.Today };
11841184
await (s.SaveAsync(a1));
11851185
await (t.CommitAsync());
11861186
}

src/NHibernate.Test/Hql/HQLFunctions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ public void ConcatAnsiFirstParam()
11421142
using (ISession s = OpenSession())
11431143
using (var t = s.BeginTransaction())
11441144
{
1145-
var a1 = new Human { NickName = nickName };
1145+
var a1 = new Human { NickName = nickName, Birthdate = DateTime.Today };
11461146
s.Save(a1);
11471147
t.Commit();
11481148
}
@@ -1169,7 +1169,7 @@ public void ConcatAnsiSecondParam()
11691169
using (ISession s = OpenSession())
11701170
using (var t = s.BeginTransaction())
11711171
{
1172-
var a1 = new Human { NickName = nickName };
1172+
var a1 = new Human { NickName = nickName, Birthdate = DateTime.Today };
11731173
s.Save(a1);
11741174
t.Commit();
11751175
}

0 commit comments

Comments
 (0)