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 AE56C9DC9C1 for ; Wed, 18 Jan 2006 23:45:09 -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 11216-06 for ; Wed, 18 Jan 2006 23:45:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from new-mail.nec.com.cn (new-mail.nec.com.cn [211.100.22.21]) by postgresql.org (Postfix) with ESMTP id F34519DC83F for ; Wed, 18 Jan 2006 23:44:57 -0400 (AST) Received: from internal-mail.nec.com.cn (unknown [172.28.88.254]) by new-mail.nec.com.cn (Postfix) with ESMTP id 7BDFA4403C for ; Thu, 19 Jan 2006 11:50:05 +0800 (CST) Received: from mailsv.necas.nec.com.cn (localhost.localdomain [127.0.0.1]) by internal-mail.nec.com.cn (Postfix) with ESMTP id 2A38C178079 for ; Thu, 19 Jan 2006 12:00:25 +0800 (CST) Received: from [172.28.9.208] (ip9_208.necas.nec.com.cn [172.28.9.208]) by mailsv.necas.nec.com.cn (8.11.6/8.11.6) with ESMTP id k0J3q1809377 for ; Thu, 19 Jan 2006 11:52:01 +0800 Message-ID: <43CF0B0B.6000101@necas.nec.com.cn> Date: Thu, 19 Jan 2006 11:44:11 +0800 From: zhaoxin User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: some question about SavePoint ? Content-Type: text/plain; charset=Shift_JIS Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.518 required=5 tests=[AWL=-0.633, RCVD_IN_WHOIS_INVALID=2.151] X-Spam-Score: 1.518 X-Spam-Level: * X-Archive-Number: 200601/178 X-Sequence-Number: 6993 Hi, I have a question about psqlodbc . After I execute a SQL , I want to ignore some error ,and continue to execute my SQL.but I will get some error like that : "current transaction is aborted, commands ignored until end of transaction block" I try to use SavePoint to solve this trouble , but I got some problem . example: ..... 1. set SQL_AUTOCOMMIT_OFF 2. SQLConnect() .............. 3. SQLExecDirect() -> SavePoint sp ; 4. SQLExecDirect() -> insert into test values(...) ; 5. SQLExecDirect() -> Release SavePoint sp; 6. SQLEndTran() -> commit ; 7. SQLExecDirect() -> SavePoint sp ; ^^^^^^^^^^^^^^^^ 8. SQLExecDirect() -> update test; ............. Until 6, it return OK, but at 7 , it will return some error like "SAVEPOINT may only be used in transaction blocks" so , I have to use "begin" to start another transaction after I execute the "commit" at 6 ? Why can I use savepoint at 3 without execute any "begin" ??? Or I have some mistake ? My psqlodbc version is 8.01.01.02(Unicode) And, I have to use SavePoint to rollback to current SQL? Don't I have another way in psqlodbc ? Regards, Zhao.