From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | "Venkatesan, Sekhar" <sekhar(dot)venkatesan(at)emc(dot)com>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! |
Date: | 2016-01-28 16:27:03 |
Message-ID: | 56AA4157.4040509@aklaver.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 01/27/2016 10:31 PM, Venkatesan, Sekhar wrote:
> Hi All,
>
> I am trying to certify our product with PostgreSQL database and facing
> an issue with windows odbc driver and need your help to identify the
> problem.
>
> Our application uses SQLDriverConnect to connect to PostgreSQL server. I
> am using PostgreSQL odbc driver version 9.4
>
> SQLSetConnectAttr to enable autocommit as below:
>
> Eg: SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON, 0)
>
> But it seems autocommit is not set and hence any queries executed from
> other session never gets updated data in other session since autocommit
> of insert statements never happens.
>
> Only workaround I am seeing is to explicitly issue “commit” to save the
> updates in the database.
>
> Has anyone seen this issue earlier? I see a relevant issue in psqlODBC
> 09.05.0100 Release something like below:
>
> https://odbc.postgresql.org/docs/release.html
>
> 1.*Don't reset autocommit when a connection is established*
>
> If autocommit is disabled on a connection, by calling
> SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF, 0), before
> connecting with SQLDriverConnect(), autocommit was incorrectly reset
> back to on when the connection was established.
>
> 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.
The only answer I have is that you might get an answer sooner if you
post this to the -odbc list:
http://www.postgresql.org/list/pgsql-odbc/
>
> Thanks,
>
> Sekhar
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Venkatesan, Sekhar | 2016-01-28 16:33:28 | Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! |
Previous Message | Venkatesan, Sekhar | 2016-01-28 06:31:52 | PostgreSQL: Autocommit through windows odbc driver doesnt work!!! |