BEGIN in windows ODBC driver - Mailing list pgsql-odbc

From Oleg Grodzevich
Subject BEGIN in windows ODBC driver
Date
Msg-id 1891429609.20020815024339@mindon.net
Whole thread Raw
List 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@mindon.net | ICQ: 37500662



pgsql-odbc by date:

Previous
From: ozgur avci
Date:
Subject: ...
Next
From: "Tulk Steve"
Date:
Subject: Re: ODBC with Visio - what's wrong with my connection string?