diff options
author | Hiroshi Inoue | 2001-04-06 09:23:44 +0000 |
---|---|---|
committer | Hiroshi Inoue | 2001-04-06 09:23:44 +0000 |
commit | ef4a163afde6213c8d91a199d8fab5c769c0a127 (patch) | |
tree | 8db002629dc742d0b260455a1834a6e1eb3b6360 | |
parent | f7f0b179099cc97689b5fa882887be175c533c63 (diff) |
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).
-rw-r--r-- | src/interfaces/odbc/convert.c | 5 |
1 files 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; |