Re: HY0000 on SQLDescribeParam

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: PostgreSQL ODBC list <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: HY0000 on SQLDescribeParam
Date: 2017-07-31 02:47:47
Message-ID: 8457bd1c-8f1e-a1af-8777-875a00ed1c86@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi Igor,

On 2017/07/31 8:26, Igor Korot wrote:
> Hi, Hiroshi,
>
> On Sun, Jul 30, 2017 at 6:07 PM, Inoue, Hiroshi
> <h-inoue(at)dream(dot)email(dot)ne(dot)jp> wrote:
>> Hi Igor,
>>
>> On 2017/07/30 22:11, Igor Korot wrote:
>>> Hi, Hiroshi,
>>>
>>> On Sun, Jul 30, 2017 at 8:06 AM, Inoue, Hiroshi
>>> <h-inoue(at)dream(dot)email(dot)ne(dot)jp> wrote:
>>>> Hi Igor,
>>>>
>>>>
>>>> On 2017/07/30 14:01, Igor Korot wrote:
>>>>> Hi, ALL,
>>>>> I'm getting an error calling SQLDescribeParam() on PostgreSQL 9.4.
>>>>>
>>>>> The message obtained by SQLGetDiagRec() reads:
>>>>>
>>>>> [quote]
>>>>> Unfortunately couldn't get this parameter info.
>>>>> [/quote]
>>>>>
>>>>> I'm on OSX 10.8 using iODBC DM.
>>>>> The PostgreSQL ODBC driver is not the current one (at least I don't
>>>>> think
>>>>> so).
>>>>>
>>>>> This same call succeeded with MS SQL Server.
>>>>>
>>>>> Does anybody have an idea of how to work around this?
>>>>
>>>> Could try to turn on the UseServerSidePrepare option?
>>>> i.e set
>>>> UseServerSidePrepare = 1
>>>> to your odbc.ini file.
>>> Yes, that worked.
>>> No more errors.
>>>
>>> Thank you.
>>>
>>> Now, shouldn't it be the default when install sinceing the driver?
>>
>> The default for UseServerSidePrepare was changed to 1 in version 09.03.0100.
> Is there a way to set it to 1 thru the ODBC API?

If you call SQLDriverConnect() to connect DB, you can use connection
strings like

SQLDriverConnect(hdbc, NULL,

"DSN=xxxxxxxx;........;UseServerSidePrepare=1;.......",

cbConnStrIn, szConnStrOut, cbConnStrOutMax,
pcbConnStrOut, fDriverCompletion);

regards,
Hiroshi Inoue

>
> Thank you.
>
>> regards,
>> Hiroshi Inoue
>>
>>
>>> Or this option should come from the DM?
>>>
>>>> regards,
>>>> Hiroshi Inoue

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Igor Korot 2017-07-31 03:02:55 Re: HY0000 on SQLDescribeParam
Previous Message Igor Korot 2017-07-30 23:26:19 Re: HY0000 on SQLDescribeParam