X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8E8929DCBB9 for ; Wed, 22 Feb 2006 08:23:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02206-10 for ; Wed, 22 Feb 2006 08:23:21 -0400 (AST) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id A35029DCB9F for ; Wed, 22 Feb 2006 08:23:16 -0400 (AST) Received: from localhost (av.hub.org [200.46.204.144]) by pgfoundry.org (Postfix) with ESMTP id CC0A41033823; Wed, 22 Feb 2006 12:23:20 +0000 (GMT) Received: from pgfoundry.org ([200.46.204.130]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03432-07; Wed, 22 Feb 2006 08:23:19 -0400 (AST) Received: by pgfoundry.org (Postfix, from userid 80) id 8D96E1033810; Wed, 22 Feb 2006 12:23:18 +0000 (GMT) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1000563 ] Rollback in manual transaction Content-type: text/plain; charset=UTF-8 Message-Id: <20060222122318.8D96E1033810@pgfoundry.org> Date: Wed, 22 Feb 2006 12:23:18 +0000 (GMT) X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=-0.726 required=5 tests=[ALL_TRUSTED=-1.44, AWL=0.164, NO_REAL_NAME=0.55] X-Spam-Score: -0.726 X-Spam-Level: X-Archive-Number: 200602/129 X-Sequence-Number: 7258 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