From: Venkatesan, Sekhar <sekhar.venkatesan@emc.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
Date: Thu, 28 Jan 2016 16:33:28 +0000
Message-ID: <F84DE43FDACD4C45AA84E2DA016FAE2F1C65A804@MX105CL01.corp.emc.com> (raw)
In-Reply-To: <56AA4157.4040509@aklaver.com>
References: <F84DE43FDACD4C45AA84E2DA016FAE2F1C65A5FC@MX105CL01.corp.emc.com>
<56AA4157.4040509@aklaver.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
Hi Adrian,
Thanks for getting back to me.
I am new to this forum. Can you please explain how to post my message in odbc list?
How to contact this list there? Is there any email ID alias?
Please help.
Thanks,
Sekhar
-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
Sent: Thursday, January 28, 2016 9:57 PM
To: Venkatesan, Sekhar; pgsql-sql@postgresql.org
Subject: Re: [SQL] PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
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.klaver@aklaver.com
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sekhar.venkatesan@emc.com, adrian.klaver@aklaver.com
Subject: Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
In-Reply-To: <F84DE43FDACD4C45AA84E2DA016FAE2F1C65A804@MX105CL01.corp.emc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox