| From: | zhaoxin <zhaox(at)necas(dot)nec(dot)com(dot)cn> | 
|---|---|
| To: | pgsql-odbc(at)postgresql(dot)org | 
| Subject: | some question about SavePoint ? | 
| Date: | 2006-01-19 03:44:11 | 
| Message-ID: | 43CF0B0B.6000101@necas.nec.com.cn | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-odbc | 
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michelle Konzack | 2006-01-19 10:31:18 | Re: Receiving multiples of Postings | 
| Previous Message | Milton | 2006-01-18 13:06:16 | Re: error messages? |