Thread: ResolveNumericParam problem

ResolveNumericParam problem

From
Andreas Pflug
Date:
When converting the value zero, the result is wrong: it is converted to
"" or ".", depending on the precision.
The attached patch insures a zero to be added, so this converts to "0"
or "0."

Regards,
Andreas

RCS file: /usr/local/cvsroot/psqlodbc/psqlodbc/convert.c,v
retrieving revision 1.99
diff -r1.99 convert.c
2381c2381,2383
<     if (ns->scale > 0)
---
>     if (!newlen)
>         chrform[newlen++] = '0';
>     if (ns->scale > 0)

Re: ResolveNumericParam problem

From
"Dave Page"
Date:
Thanks, patch applied.

Regards, Dave.

> -----Original Message-----
> From: Andreas Pflug [mailto:Andreas.Pflug@web.de]
> Sent: 16 June 2003 12:15
> To: pgsql-odbc@postgresql.org; Dave Page
> Subject: ResolveNumericParam problem
>
>
> When converting the value zero, the result is wrong: it is
> converted to
> "" or ".", depending on the precision.
> The attached patch insures a zero to be added, so this
> converts to "0"
> or "0."
>
> Regards,
> Andreas
>
>