Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aOpWB-00049a-VM for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 16:34:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aOpWB-00049N-Dx for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 16:33:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOpWA-000498-OP for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 16:33:59 +0000 Received: from mailuogwhop.emc.com ([168.159.213.141]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOpW2-0001mM-45 for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 16:33:56 +0000 Received: from maildlpprd02.lss.emc.com (maildlpprd02.lss.emc.com [10.253.24.34]) by mailuogwprd02.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u0SGXinZ003143 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 28 Jan 2016 11:33:45 -0500 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com u0SGXinZ003143 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=emc.com; s=jan2013; t=1453998825; bh=kaU9mprpZAwOfbZXG7IJ4fTNR0g=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=XU2CEd2elBNJQfyXf/u6gFOOMD+HhNgP6SF9xodI04URKL+pgKiZJdfbAixp6tt/y +vgQuKGMtUOwEQ/aKSzVclJUioFZT//FFUGmYic+yKqEBQwXMuK2k73JSb5fZN2WTb bIzJUcV5fG3eF9jLQ17POlkOHTsZDE9RpD4FQEFE= X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com u0SGXinZ003143 Received: from mailusrhubprd54.lss.emc.com (mailusrhubprd54.lss.emc.com [10.106.48.19]) by maildlpprd02.lss.emc.com (RSA Interceptor); Thu, 28 Jan 2016 11:33:18 -0500 Received: from MXHUB216.corp.emc.com (MXHUB216.corp.emc.com [10.253.68.86]) by mailusrhubprd54.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u0SGXUpZ006032 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=FAIL); Thu, 28 Jan 2016 11:33:30 -0500 Received: from MX105CL01.corp.emc.com ([fe80::e020:347b:74e3:4176]) by MXHUB216.corp.emc.com ([10.253.68.86]) with mapi id 14.03.0266.001; Thu, 28 Jan 2016 11:33:29 -0500 From: "Venkatesan, Sekhar" To: Adrian Klaver , "pgsql-sql@postgresql.org" Subject: Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! Thread-Topic: [SQL] PostgreSQL: Autocommit through windows odbc driver doesnt work!!! Thread-Index: AdFZlKwYGssRJphmQLWh8p8v4os3FAAffUOAAApPZrA= Date: Thu, 28 Jan 2016 16:33:28 +0000 Message-ID: References: <56AA4157.4040509@aklaver.com> In-Reply-To: <56AA4157.4040509@aklaver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.42.37.27] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd54.lss.emc.com X-RSA-Classifications: public X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Hi Adrian, Thanks for getting back to me.=20 I am new to this forum. Can you please explain how to post my message in od= bc 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]=20 Sent: Thursday, January 28, 2016 9:57 PM To: Venkatesan, Sekhar; pgsql-sql@postgresql.org Subject: Re: [SQL] PostgreSQL: Autocommit through windows odbc driver doesn= t work!!! On 01/27/2016 10:31 PM, Venkatesan, Sekhar wrote: > Hi All, > > I am trying to certify our product with PostgreSQL database and=20 > facing an issue with windows odbc driver and need your help to=20 > identify the problem. > > Our application uses SQLDriverConnect to connect to PostgreSQL server.=20 > 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=20 > other session never gets updated data in other session since=20 > autocommit of insert statements never happens. > > Only workaround I am seeing is to explicitly issue "commit" to save=20 > 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=20 > SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF, 0), before=20 > connecting with SQLDriverConnect(), autocommit was incorrectly reset=20 > back to on when the connection was established. > > Is the above issue fixed? Also in my use-case, I want to enable=20 > 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 an= y. The only answer I have is that you might get an answer sooner if you post t= his to the -odbc list: http://www.postgresql.org/list/pgsql-odbc/ > > Thanks, > > Sekhar > -- Adrian Klaver adrian.klaver@aklaver.com --=20 Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql