From: | "Venkatesan, Sekhar" <sekhar(dot)venkatesan(at)emc(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org> |
Cc: | "Rao, Raghavendra" <raghavendra(dot)rao(at)emc(dot)com>, "Choudhuri, Saurav" <saurav(dot)choudhuri(at)emc(dot)com> |
Subject: | Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! |
Date: | 2016-01-29 10:25:21 |
Message-ID: | F84DE43FDACD4C45AA84E2DA016FAE2F1C65AA7D@MX105CL01.corp.emc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Including few people in this loop.
-----Original Message-----
From: Venkatesan, Sekhar
Sent: Friday, January 29, 2016 10:04 AM
To: 'Joshua D. Drake'; 'pgsql-odbc(at)postgresql(dot)org'
Subject: RE: [ODBC] PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
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?
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
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
--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-01-29 21:29:51 | Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! |
Previous Message | Venkatesan, Sekhar | 2016-01-29 04:36:05 | Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! |