X-Original-To: pgsql-odbc@postgresql.org Received: from mail.bacchus.com.au (unknown [203.22.71.65]) by postgresql.org (Postfix) with ESMTP id E8633475AFF for ; Thu, 20 Mar 2003 23:13:01 -0500 (EST) Received: from joe ([203.185.231.74]) by mail.bacchus.com.au (8.12.8/8.12.5) with SMTP id h2L4D5Jb020559 for ; Fri, 21 Mar 2003 14:13:05 +1000 Message-Id: <200303210413.h2L4D5Jb020559@mail.bacchus.com.au> Date: Fri, 21 Mar 2003 15:11:21 +1100 To: From: "Wayne Armstrong" Reply-To: "Wayne Armstrong" In-Reply-To: <000801c2ef56$0df485f0$0da8a8a8@zengjun> References: <000801c2ef56$0df485f0$0da8a8a8@zengjun> Subject: Re: Can I do anything to prevent " auto rollback in a transaction when an error occurs " MIME-Version: 1.0 X-Mailer: The Polarbar Mailer; version=1.24c; build=1746 X-Archive-Number: 200303/37 X-Sequence-Number: 2756 ** Reply to message from "junzeng" on Fri, 21 Mar 2003 11:00:39 +0800 Hi, If you set the dissalow premature option in the odbc driver it can reduce the risk of this - but it still does happen and it's extremely dangerous :(. I have hacked the odbc driver (for the 7.72.0.5 level) to work with visualage smalltalk, and have removed the rollback on error with no obvious bad side effects. (there probably are some though). Regards, Wayne > In a transaction , if a sql command invite an error , all commands before this > command will be rollbacked , and the transaction reset and restart. > For example: > > BEGIN > insert t1 values(1); > delete from t2 > insert t1 values(2); > commit > > if table t2 doesn't exist , "delete from t2" invites an error , and the insert will be rollbacked . > > How can I prevent the rollback even when an error occurs ? Thanks