Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!

From: "Venkatesan, Sekhar" <sekhar(dot)venkatesan(at)emc(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
Date: 2016-02-15 09:07:19
Message-ID: F84DE43FDACD4C45AA84E2DA016FAE2F1C667304@MX105CL01.corp.emc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Can anyone shed some light on this issue (highlighted in BOLD )?

FYI, I have tried with psqlodbc driver version 9.5 but no luck.

Thanks,
Sekhar

-----Original Message-----
From: Adrian Klaver [mailto:adrian(dot)klaver(at)aklaver(dot)com]
Sent: Tuesday, February 09, 2016 8:45 PM
To: Venkatesan, Sekhar; Joshua D. Drake; pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] PostgreSQL: Autocommit through windows odbc driver doesnt work!!!

On 02/08/2016 08:10 PM, Venkatesan, Sekhar wrote:

Ccing list.

> Hi Adrian,

>

> Sorry for getting back to you late. I tried with psqlodbc version, 09.05.0100 but the issue is still seen?

> Let me know what next step I can follow to root cause this? Any tracing you would suggest?

I do not have an answer, returning this to list for those that might.

>

> Thanks,

> Sekhar

>

> -----Original Message-----

> From: Adrian Klaver [mailto:adrian(dot)klaver(at)aklaver(dot)com]

> Sent: Saturday, January 30, 2016 3:00 AM

> To: Venkatesan, Sekhar; Joshua D. Drake; pgsql-odbc(at)postgresql(dot)org<mailto:pgsql-odbc(at)postgresql(dot)org>

> Subject: Re: [ODBC] PostgreSQL: Autocommit through windows odbc driver doesnt work!!!

>

> On 01/28/2016 08:36 PM, Venkatesan, Sekhar wrote:

>> HI Joshua,

>>

>> I perform the following set of operations to set autocommit in postgreSQL through ODBC in windows.

>> SQLSetConnectAttr(hDbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)

>> SQL_AUTOCOMMIT_ON, 0)

>>

>> ret = SQLDriverConnect(_hdbc, NULL, (SQLCHAR*) dsn.GetChars(),

>> SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT);

>>

>> This doesn't enable autocommit. If I call SQLSetConnectAttr after SQLDriverConnect, autocommit is set.

>> Any issue with this sequence? I assume It should be possible to set SQL_ATTR_AUTOCOMMIT before establishing connection.

>> Can you please confirm on this behavior?

>

> I would say it is this bug:

>

> http://www.postgresql.org/message-id/55BD0ABE.5010800@iki.fi

>

> So have you tried the latest psqlodbc version, 09.05.0100 ?

>

>>

>> Thanks,

>> Sekhar

>>

>> -----Original Message-----

>> From: Joshua D. Drake [mailto:jd(at)commandprompt(dot)com]

>> Sent: Thursday, January 28, 2016 11:14 PM

>> To: Venkatesan, Sekhar; pgsql-odbc(at)postgresql(dot)org<mailto:pgsql-odbc(at)postgresql(dot)org>

>> Subject: Re: [ODBC] PostgreSQL: Autocommit through windows odbc driver doesnt work!!!

>>

>> On 01/28/2016 08:53 AM, Venkatesan, Sekhar wrote:

>>

>>> Is the above issue fixed? Also in my use-case, I want to enable

>>> autocommit at odbc driver level but even that doesn't work.

>>>

>>> The same application works in Linux OS when unix odbc driver is used.

>>> This seems to be specific to windows driver.

>>>

>>> Please shed some light on this. Do ask me further question if you have any.

>>>

>>

>> By default PostgreSQL "autocommits". If it isn't in your case, your driver is starting a transaction and not committing it.

>>

>> Sincerely,

>>

>> JD

>>

>>

>>

>>

>

>

> --

> Adrian Klaver

> adrian(dot)klaver(at)aklaver(dot)com<mailto:adrian(dot)klaver(at)aklaver(dot)com>

>

--

Adrian Klaver

adrian(dot)klaver(at)aklaver(dot)com<mailto:adrian(dot)klaver(at)aklaver(dot)com>

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Dang Minh Huong 2016-02-15 09:12:55 Re: Degradation of performance when upgrade psqlodbc to 09.03.0400
Previous Message Adrian Klaver 2016-02-14 18:36:36 Re: PostgreSQL: Inserting NULL values adds empty string.