× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 05 Mar 2013 09:38, Sheldon Foster wrote:
I have the following code to test rollback transaction processing. I
get a count of records from a table, then delete all the records,
then perform a roll back which should (supposedly) restore the
records back to the table. I am able to confirm that the
db2_autocommit_off is indeed getting set, but the rollback function
never rolls back the prior deletion. I can't seem to find much on the
internet. What am I missing? (fyi, $telusr and $telpwd are being set
correctly but I have not included the code here).

<<SNIP>>
// Delete all rows from teltrn

db2_exec($conn, "DELETE FROM teltrn");
<<SNIP>>

I am not sure about the interface being used, but in some cases there is the /isolation level/ that must also be set to something other than NC [aka NONE or No Commit]; i.e. the auto-commit feature does not also define the commitment-control\isolation-level to be used. A SQL DELETE statement without the WITH-isolation-level clause will use the default isolation. Thus a circumvention [pending resolution to establishing the desired isolation-level for the connection, in addition to having established the no-autocommit], is to specify something like WITH UR on the request to explicitly request the isolation to use on the DML statement; e.g.:
db2_exec($conn, "DELETE FROM teltrn WITH UR");


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.