Skip site navigation (1) Skip section navigation (2)

Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"

From: Barry Bell <Barry_Bell(at)harte-hanks(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
Date: 2012-04-10 12:29:57
Message-ID: 542B943ED5D72E408BF9CBBD61ABC94D52D10D6E@VA3DIAXVSC31.RED001.local (view raw or flat)
Thread:
Lists: pgsql-bugs
No matter what numeric type I try to pass,(integer, numeric, currency) the ODBC driver is turning it into "Double Precision"
Only If I send the value as a string
Declare nvar as numeric(10,2)
Nvar=1, nvar=1.0000 or nvar=1.00 will come across as "Double Precision" input bind variable.
Sending
Nvar="1" will work but there are issues with converting numbers to character,

Any Ideas?


Thanks
Barry Bell, IT Department 
Office: 954-429-3771 x267 Fax: 954-281-1464 email Barry_Bell(at)harte-hanks(dot)com


-----Original Message-----
From: Amit Kapila [mailto:amit(dot)kapila(at)huawei(dot)com] 
Sent: Monday, April 09, 2012 8:49 PM
To: Barry Bell
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: RE: [BUGS] BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"

In ODBC while binding variable using SQLBindParameter(..) API you might be using SQL_DOUBLE or SQL_Numeric or some similar datatype to send the variable, that's why in postgres it is showing as "Double precision"

-----Original Message-----
From: pgsql-bugs-owner(at)postgresql(dot)org
[mailto:pgsql-bugs-owner(at)postgresql(dot)org] On Behalf Of Robert Haas
Sent: Monday, April 09, 2012 7:31 PM
To: barry_bell(at)harte-hanks(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"

On Thu, Mar 15, 2012 at 3:04 PM,  <barry_bell(at)harte-hanks(dot)com> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      6534
> Logged by:          Barry Bell
> Email address:      barry_bell(at)harte-hanks(dot)com PostgreSQL version: 
> 9.1.2 Operating system:   Windows Server 2003
> Description:
>
> Using the lastest of ODBC ANSI driver for windows 32bit ver 9.00.03 
> Calling from MS VFP 9.0
>
> public nvar as interger
> nvar=1
> running the following sql:
> "( select function_pkg(?nvar) "
>
> The bind variable nvar will show in postgres as "Double Precision" 
> format instead of integer.
>
> Is there a setting on the ODBC driver for incoming vairables?
> If not it is a buf.

Given the lack of any response here, I suggest reposting this to the pgsql-odbc mailing list.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

--
Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs




In response to

Responses

pgsql-bugs by date

Next:From: istvan.endredyDate: 2012-04-10 14:43:07
Subject: BUG #6579: negative cost in a planning
Previous:From: Simon WillettDate: 2012-04-10 11:01:29
Subject: Re: BUG #6204: Using plperl functions generate crash

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group