Re: Problem retrieving a numeric(38,0) value as SQL_NUMERIC_STRUCT if value needs to use all 16 SQLCHAR elements of the val array

From: Walter Couto <Walter(dot)Couto(at)EMBARCADERO(dot)COM>
To: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Problem retrieving a numeric(38,0) value as SQL_NUMERIC_STRUCT if value needs to use all 16 SQLCHAR elements of the val array
Date: 2014-06-03 10:56:54
Message-ID: j0tthniykd2l143alwlicnex.1401792898107@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Yes I can

-------- Original message --------
From: "Inoue, Hiroshi"
Date:06/02/2014 11:47 PM (GMT-05:00)
To: Walter Couto ,pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] Problem retrieving a numeric(38,0) value as SQL_NUMERIC_STRUCT if value needs to use all 16 SQLCHAR elements of the val array

Hi Walter,

Could you test a patch if I send it to you?

regards,
Hiroshi Inoue

(2014/06/03 4:03), Walter Couto wrote:
> Make sure you have the following table and data created in the database:
>
> CREATE TABLE NUMBER_TEST
>
> (
>
> test integer NOT NULL,
>
> numeric_double_col numeric(38,0)
>
> CONSTRAINT number_test_pkey PRIMARY KEY (test)
>
> )
>
> ;
>
> INSERT INTO NUMBER_TEST VALUES ( 6,
> 12345678901234567890123456789012345678 );
>
> ;
>
> Execute the statement: select numeric_double_col from trunit.number_test
> where test = 6
>
> Using the ODBC driver, bind using SQL_NUMERIC_STRUCT.
>
> Expected values in the structure:
>
> precision = 38
>
> scale = 0
>
> sign = 1
>
> val = 0949B0F6F0023313C4499050DE38F34E
>
> Actual values in the structure:
>
> precision = 38
>
> scale = -1
>
> sign = 1
>
> val = 0049B0F6F0023313C4499050DE38F34E
>
> Other smaller values for the same column work fine. Any ideas?
>
> Regards,
>
> Walter

--
I am using the free version of SPAMfighter.
SPAMfighter has removed 10487 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen

CONFIDENTIALITY NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message David Joffe 2014-06-03 11:06:15 Re: Recent ODBC drivers possibly broken on XP - missing msvcrt dll
Previous Message Michael Paquier 2014-06-03 10:42:53 Re: Mentioning CPU for Windows build in docs