Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkUqg-00075K-86 for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 08:47:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WkUqf-0005Zy-IY for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 08:47:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkUqe-0005Zr-OG for pgsql-odbc@postgresql.org; Wed, 14 May 2014 08:47:36 +0000 Received: from mail-pb0-x234.google.com ([2607:f8b0:400e:c01::234]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkUqa-0001uZ-Su for pgsql-odbc@postgresql.org; Wed, 14 May 2014 08:47:35 +0000 Received: by mail-pb0-f52.google.com with SMTP id rr13so1427503pbb.39 for ; Wed, 14 May 2014 01:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=EjOVNBwGR2pl0AEPsf9hvc32ppyDB1+sf8YWn3zcpiU=; b=0mQvWcp/WLTGxW9EKk07z6xgNk97MAopkWLOyIzcum+cV5nstUIsB1C/e2NBsbhpg0 SALQZt6HyGdEniEDs/azkPVl0+KA1BbmIXHy41yWMSSu3TQOf0PKDuLAqZQ6llV8ZOCH FZVfDkuE+mK5f7UhCw41lcS1p1Oo8Kpj/tXI9P6swhkTspBRlXSbaiJoDhWE8QV65+V1 /bTCdHLxfUl3eE/tND5XiBaE3t16WA7SJFpThagZIdQyppcriDe+9ehbRNECWXaAzgYL xZ4++6rMTq9C2mVPGTHuiKGrol1DlibW99VFGvThrDoOZpQmUh1OY7FsunYFMDMcKgS4 GJ3w== X-Received: by 10.66.240.130 with SMTP id wa2mr2679140pac.73.1400057250338; Wed, 14 May 2014 01:47:30 -0700 (PDT) Received: from [10.128.70.87] (dsl-58-6-192-58.wa.westnet.com.au. [58.6.192.58]) by mx.google.com with ESMTPSA id ba5sm2222435pbc.61.2014.05.14.01.47.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 01:47:29 -0700 (PDT) Message-ID: <53732D9D.1060605@gmail.com> Date: Wed, 14 May 2014 16:47:25 +0800 From: aihtdikh Reply-To: aihtdikh@gmail.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Dev Kumkar CC: "pgsql-odbc@postgresql.org" Subject: Re: ODBC : SQLGetData question References: <53730FFB.5020304@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) 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 On 14/05/14 15:46, Dev Kumkar wrote: > > > my_buff_len is defined as SQLLEN > SQLLEN my_buff_len; > > > if ((int)my_buff_len == SQL_NULL_DATA) > { > // will come here > } > > The above casting solves the problem, please review? > That will work around the issue, but I'm stumped as to why it was not working for you already. It seems like your platform must be 64bit, and something somewhere is converting what should be a 64bit SQLLEN into a 32bit value, but I can't find anywhere in the source that does anything unsafe in this regard - it's SQLLEN all the way. Edit: Ah, Nick may be on the right path there. Could the driver have been compiled with a different sqltypes.h than the application? If so, you could try compiling the driver under the same setup as your application to see if that fixes it. Regards, Harun -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc