Skip site navigation (1) Skip section navigation (2)

BEGIN in windows ODBC driver

From: Oleg Grodzevich <illinar(at)mindon(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: BEGIN in windows ODBC driver
Date: 2002-08-15 06:43:39
Message-ID: 1891429609.20020815024339@mindon.net (view raw or flat)
Thread:
Lists: pgsql-odbc
Hello,

I  was  trying to execute a serie of SQL requests in a transaction, by
doing:

BEGIN
request
request
request
COMMIT

But  each  BEGIN  was  followed  by  immediate  COMMIT  hence  making
transaction  impossible. As far as I get from source code, the problem
is in SC_execute (statement.c): 1010

        if (!self->internal && CC_is_in_autocommit(conn) && CC_is_in_trans(conn))
        {
            res = CC_send_query(conn, "COMMIT", NULL);
            QR_Destructor(res);
            CC_set_no_trans(conn);
        }

(after commenting this out, I got things working).
Also
execute.c:350
            if (strnicmp(stmt->stmt_with_params, "BEGIN;", 6) == 0)
                begin_included = TRUE;
seems  to  be  very  very  strange, as "BEGIN;" is not always the case
(consider "BEGIN TRANSACTION;" for instance).

Does anyone has any comments on it?

PS:  I  am  not  subscribed  to this maillist, so please respond on my
e-mail as well.

-- 
Best regards,   | homepage: http://www.mindon.net/illinar
Oleg Grodzevich | e-mail:   illinar(at)mindon(dot)net | ICQ: 37500662



pgsql-odbc by date

Next:From: ozgur avciDate: 2002-08-17 21:50:19
Subject:
Previous:From: Jason KoeningerDate: 2002-08-11 00:08:13
Subject: Transaction Isolation Level

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group