BEGIN in windows ODBC driver
| От | Oleg Grodzevich |
|---|---|
| Тема | BEGIN in windows ODBC driver |
| Дата | |
| Msg-id | 1891429609.20020815024339@mindon.net обсуждение исходный текст |
| Список | 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 по дате отправления: