Re: ODBC : SQLGetData question

From: Dev Kumkar <devdas(dot)kumkar(at)gmail(dot)com>
To: Nick Gorham <nick(at)lurcher(dot)org>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: ODBC : SQLGetData question
Date: 2014-05-14 14:25:51
Message-ID: CALSLE1Pw2p7t+BpfTZ=UXqMDjB4u7isYcG7FZ7Q4XmKwLpKerw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On Wed, May 14, 2014 at 3:38 PM, Nick Gorham <nick(at)lurcher(dot)org> wrote:

> We are deploying the driver as it is and not compiling it in-house
> currently.
>
> Yes, the platform is 64-bit.
>
> In that case compile the application with the same setup as the driver.
>

Thanks again for the help here. I think as you mentioned before the
application expects sizeof( SQLLEN ) == 8 and the driver sizeof( SQLLEN )
== 4 which results into this issue.

Actually tried to initialize my_buff_len = SQL_NULL_DATA;
The next printf correctly prints the value of my_buff_length as -1.

Only after SQLGetData(my_stmt, my_col_no, SQL_C_CHAR, &my_max_len, 0,
&my_buff_len) the value of my_buff_len becomes 429496729.

Is it possible the ODBC header files on machine where am compiling
application is having issues or as you mentioned before its the issue with
the environment with which ODBC driver was compiled?

Am downloading the driver from here: 9.2.1 ODBC Driver

http://yum.postgresql.org/9.3/redhat/rhel-5.0-x86_64/

Regards...

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Barry Bell 2014-05-14 14:29:48 Re: psqlODBC text length with no records
Previous Message Adrian Klaver 2014-05-14 14:16:12 Re: psqlODBC text length with no records