pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hong06 <honghe06@gmail.com>
To: pgsql-odbc@postgresql.org
Subject: ODBC isolationi level SQL_TXN_SERIALIZABLE -> "08001 Already connected."
Date: Fri, 30 Sep 2016 06:41:26 -0700 (MST)
Message-ID: <1475242886765-5923778.post@n3.nabble.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Hello everyone,

I just ran into following issue with a big surprise that it does not work in
ODBC.

What I am doing is:
- set the isolation level to: SQL_TXN_SERIALIZABLE
- then connect to postgres database via ODBC function SQLDriverConnect()

Example code:

    ret = SQLSetConnectAttr(hDbc, SQL_ATTR_TXN_ISOLATION,
(SQLPOINTER)SQL_TXN_SERIALIZABLE, SQL_IS_INTEGER);
    
    ret = SQLDriverConnect(hConnect,
                                  0,
                                 (SQLCHAR*)connString,
                                  ustrlen((unsigned char *)connString),
                                  NULL,
                                  0,
                                  NULL,
                                  SQL_DRIVER_NOPROMPT);

Then SQLDriverConnect() returns -1 with error code: "08001 Already
connected."

With other isolation level like SQL_TXN_READ_COMMITTED, it works fine.

Any idea to solve this problem? Or is this a Postgres ODBC bug? I couldn't
find anything here or on Google.







--
View this message in context: http://postgresql.nabble.com/ODBC-isolationi-level-SQL-TXN-SERIALIZABLE-08001-Already-connected-tp59...
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



Message-ID: <1475242886765-5923778.post@n3.nabble.com>
Permalink:  ../1475242886765-5923778.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1475242886765-5923778.post@n3.nabble.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: honghe06@gmail.com
  Subject: Re: ODBC isolationi level SQL_TXN_SERIALIZABLE -> "08001 Already connected."
  In-Reply-To: <1475242886765-5923778.post@n3.nabble.com>
  References: <1475242886765-5923778.post@n3.nabble.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