aboutsummaryrefslogtreecommitdiffstats
path: root/lib/odbc/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/odbc/src')
-rw-r--r--lib/odbc/src/odbc.erl10
-rw-r--r--lib/odbc/src/odbc_internal.hrl1
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/odbc/src/odbc.erl b/lib/odbc/src/odbc.erl
index f8914639e6..eb27a471ec 100644
--- a/lib/odbc/src/odbc.erl
+++ b/lib/odbc/src/odbc.erl
@@ -931,6 +931,16 @@ fix_params({sql_double, InOut, Values}) ->
{?USER_DOUBLE, fix_inout(InOut), Values};
fix_params({sql_bit, InOut, Values}) ->
{?USER_BOOLEAN, fix_inout(InOut), Values};
+fix_params({'sql_timestamp', InOut, Values}) ->
+ NewValues =
+ case (catch
+ lists:map(fun({{Year,Month,Day},{Hour,Minute,Second}}) ->
+ {Year,Month,Day,Hour,Minute,Second}
+ end, Values)) of
+ Result ->
+ Result
+ end,
+ {?USER_TIMESTAMP, fix_inout(InOut), NewValues};
%% default is IN %%%
fix_params({Type, Values}) ->
fix_params({Type, in, Values}).
diff --git a/lib/odbc/src/odbc_internal.hrl b/lib/odbc/src/odbc_internal.hrl
index 10ed139338..aa60120f9a 100644
--- a/lib/odbc/src/odbc_internal.hrl
+++ b/lib/odbc/src/odbc_internal.hrl
@@ -71,6 +71,7 @@
-define(USER_TINY_INT, 11).
-define(USER_WCHAR, 12).
-define(USER_WVARCHAR, 13).
+-define(USER_TIMESTAMP, 14).
%% INPUT & OUTPUT TYPE
-define(IN, 0).