Wrong numeric conversion

Поиск
Список
Период
Сортировка
Искать
От
Andreas Pflug
Тема
Wrong numeric conversion
Дата
Msg-id
41EA879A.9030802@pse-consulting.de
Список
Дерево обсуждения
Re: Wrong numeric conversion "Dave Page" <dpage@vale-housing.co.uk>
With CVS HEAD, numeric values are not read correctly.
The SQL_NUMERIC_STRUCT is filled with
.precision=3, .scale=5 for a number like 500.00123, which MSDASQL will 
interpret as .00123 (noticed when MSDASQL had to convert it to a 
string). Obviously the precision should be 8 or more.
The attached patch corrects this.

Regards,
Andreas
Index: convert.c
===================================================================
RCS file: /usr/local/cvsroot/psqlodbc/psqlodbc/convert.c,v
retrieving revision 1.121
diff -u -r1.121 convert.c
--- convert.c	30 Jul 2004 21:08:12 -0000	1.121
+++ convert.c	16 Jan 2005 15:19:32 -0000
@@ -1145,8 +1145,8 @@
 					{
 						if (dot_exist)
 							ns->scale++;
-						else
-							ns->precision++;
+
+						ns->precision++;
 						calv[nlen++] = *wv;
 					}
 				}
В списке pgsql-odbc по дате отправления
От: George Weaver
Дата:
Сообщение: Re: ODBC release plans?
От: Dave Page
Дата:
Сообщение: Re: Wrong numeric conversion
FAQ