From 956ea205ebc5ace2a25b8c8f6b92ba60e7c1fc5c Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 26 Jul 2014 14:13:40 +0000 Subject: [PATCH] Call GetDateTimeValue for all temporal types on all server versions. --- source/dbconnection.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 0f5ba0f2..e659bca3 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -5794,7 +5794,7 @@ begin else begin if Datatype(i).Index in [dtNchar, dtNvarchar, dtNtext] then Val := 'N' + Connection.EscapeString(Cell.NewText) - else if (Datatype(i).Index in [dtDate, dtDateTime]) and FConnection.Parameters.IsMSSQL then + else if Datatype(i).Category = dtcTemporal then Val := Connection.EscapeString(Connection.GetDateTimeValue(Cell.NewText, Datatype(i).Index)) else Val := Connection.EscapeString(Cell.NewText);