Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wrffh-0008SK-DE for pgsql-odbc@arkaria.postgresql.org; Tue, 03 Jun 2014 03:45:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wrfff-0005GA-Vf for pgsql-odbc@arkaria.postgresql.org; Tue, 03 Jun 2014 03:45:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Wrfff-0005Fy-Cn for pgsql-odbc@postgresql.org; Tue, 03 Jun 2014 03:45:55 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by makus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wrffc-0007uO-5r for pgsql-odbc@postgresql.org; Tue, 03 Jun 2014 03:45:53 +0000 Received: (qmail 4734 invoked by uid 512); 3 Jun 2014 03:45:51 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.126.1.62) by sd2.tpf-fw-c.co.jp with SMTP; 3 Jun 2014 03:45:51 -0000 Message-ID: <538D44EC.10201@tpf.co.jp> Date: Tue, 03 Jun 2014 12:45:48 +0900 From: "Inoue, Hiroshi" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Walter Couto , "pgsql-odbc@postgresql.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 References: <7FA4F9E5512F214C801E596ECD8790E066A79839@ETNAMAIL01.embarcadero.com> In-Reply-To: <7FA4F9E5512F214C801E596ECD8790E066A79839@ETNAMAIL01.embarcadero.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org 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 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc