Commit ef4a163a authored by Hiroshi Inoue's avatar Hiroshi Inoue

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).
parent f7f0b179
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment