From: noreply@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [ psqlodbc-Bugs-1000563 ] Rollback in manual transaction
Date: Wed, 22 Feb 2006 12:23:18 +0000 (GMT)
Message-ID: <20060222122318.8D96E1033810@pgfoundry.org> (raw)
Bugs item #1000563, was opened at 22/02/2006 12:23
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000563&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Lorenzo Marcone (marcone)
Assigned to: Nobody (None)
Summary: Rollback in manual transaction
Initial Comment:
Postgres 8.1 either Windows or linux
psqlODBC 08.01.0200
.Net Framework 1.1 in particular Visual Basic
In Notes: psqlODBC 08.01.0106 I read:
...
3) doesn't call rollback in autocommit off or in manual transaction
...
But Executing a statement in a transaction which gives an error causes an implicit rollback of the transaction and the close of the connection.
Sample code:
Dim cnt As New Odbc.OdbcConnection"Driver={PostgreSQL Unicode}; Server=****; Database=test_ado; Uid=postgres; Password=****; BoolsAsChar=0; Parse=0; UniqueIndex=1; TextAsLongVarchar=1; LowerCaseIdentifier=1")
Dim tra As Odbc.OdbcTransaction
Dim sSql As String
Try
cnt.Open()
tra = cnt.BeginTransaction()
'Setting Primary key to Null cause an error
sSql = "UPDATE test_ado SET cod=Null WHERE cod ='00004'"
Dim cmd As New Odbc.OdbcCommand(sSql, cnt)
cmd.CommandText = sSql
cmd.Transaction = tra
cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message)
MsgBox(cnt.State.ToString)
End Try
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000563&group_id=1000125
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: noreply@pgfoundry.org
Subject: Re: [ psqlodbc-Bugs-1000563 ] Rollback in manual transaction
In-Reply-To: <20060222122318.8D96E1033810@pgfoundry.org>
References: <20060222122318.8D96E1033810@pgfoundry.org>
* 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