From ef4a163afde6213c8d91a199d8fab5c769c0a127 Mon Sep 17 00:00:00 2001
From: Hiroshi Inoue <inoue@tpf.co.jp>
Date: Fri, 6 Apr 2001 09:23:44 +0000
Subject: [PATCH] 1) Fit the precision of floating point to that of server side
    (fix by Hiroki kataoka). 2) Ensure the definition of atof()(#include
 stdlib.h).   (suggestion by Masaaki Sakaida).

---
 src/interfaces/odbc/convert.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/interfaces/odbc/convert.c b/src/interfaces/odbc/convert.c
index 2dca3edfa12..1b56c5df887 100644
--- a/src/interfaces/odbc/convert.c
+++ b/src/interfaces/odbc/convert.c
@@ -42,6 +42,7 @@
 
 #include <time.h>
 #include <math.h>
+#include <stdlib.h>
 #include "convert.h"
 #include "statement.h"
 #include "qresult.h"
@@ -892,12 +893,12 @@ copy_statement_with_parameters(StatementClass *stmt)
 				break;
 
 			case SQL_C_DOUBLE:
-				sprintf(param_string, "%f",
+				sprintf(param_string, "%15g",
 						*((SDOUBLE *) buffer));
 				break;
 
 			case SQL_C_FLOAT:
-				sprintf(param_string, "%f",
+				sprintf(param_string, "%6g",
 						*((SFLOAT *) buffer));
 				break;
 
-- 
GitLab