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

[ psqlodbc-Bugs-1000564 ] Rollback in manual transaction

From: <noreply(at)pgfoundry(dot)org>
To: noreply(at)pgfoundry(dot)org
Subject: [ psqlodbc-Bugs-1000564 ] Rollback in manual transaction
Date: 2006-03-18 22:01:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Bugs item #1000564, was opened at 2006-02-22 12:23
You can respond by visiting:

Category: None
Group: None
>Status: Deleted
>Resolution: Rejected
Priority: 3
Submitted By: Nobody (None)
>Assigned to: Hiroshi Inoue (hinoue)
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

    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

Catch ex As Exception
End Try


>Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-18 22:01

This item is duplicated.


You can respond by visiting:

pgsql-odbc by date

Next:From: Campbell, GregDate: 2006-03-18 22:17:45
Subject: Re: How To Connect PostgreSQL thru VB without DSN
Previous:From: noreplyDate: 2006-03-18 21:56:11
Subject: [ psqlodbc-Bugs-1000563 ] Rollback in manual transaction

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