X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 25EFCD8551 for ; Tue, 30 Aug 2005 17:24:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56035-08 for ; Tue, 30 Aug 2005 20:24:04 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by svr1.postgresql.org (Postfix) with ESMTP id 7C466D845F for ; Tue, 30 Aug 2005 17:24:03 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id z6so827335nzd for ; Tue, 30 Aug 2005 13:24:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ovYYjHqK7rzK67BmX03vk/J2cTB8c++YCyHKq1lw4dHt9EkFKfC/9Bs6oRnlhWerXzEFiJgApxVW5Ec88/Z5jYSOyeOylYVbufbPerRVKz8WGUQ43/UnRyqTWnrppHXbuGVypmQfiu/4iziL8bw1FA88tTWyDKFf2ZmZjaWV+0U= Received: by 10.37.13.7 with SMTP id q7mr2084940nzi; Tue, 30 Aug 2005 13:24:02 -0700 (PDT) Received: by 10.36.247.45 with HTTP; Tue, 30 Aug 2005 13:24:00 -0700 (PDT) Message-ID: Date: Tue, 30 Aug 2005 17:24:00 -0300 From: Cleber Nardelli To: pgsql-odbc@postgresql.org Subject: Transactions and SavePoints Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.127 required=5 tests=[AWL=-0.104, RCVD_BY_IP=0.024, UPPERCASE_25_50=0.207] X-Spam-Level: X-Archive-Number: 200508/231 X-Sequence-Number: 5870 Hello. I am using the Driver odbc for access to postgresql. =20 I have a referring problem to the cancellation of the transaction when some error is found at the moment of the execution of the same one. =20 I try to execute this sql command: =20 BEGIN TRANSACTION; DELETE FROM TABL1 WHERE ID =3D 1; INSERT INTO TABL1 VALUES (1,1); SAVEPOINT SVPT; INSERT INTO TABL1 VALUES (1,1); ROLLBACK TO SAVEPOINT SPVT; COMMIT; When I try to insert as register it accuses to error with key duplicate. O= k. =20 But I do not want to cancel the transaction I I need to only continue with the same one skirting this error. For this reason I am using SavePoints but it generates the error: "ERROR: ROLLBACK TO SAVEPOINT may only be used in transaction blocks" Necessary of the your help. =20 I thank=20 Yours truly --=20 Cleber Nardelli