By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,288 Members | 3,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,288 IT Pros & Developers. It's quick & easy.

OO4O Transactions: Updates not being rolled=back

P: n/a
CJM
I'm using OO4O via ASP to manipulate an Oracle 10g database (v10.1.0.4).

At the start of each vbScript section I'm starting off the transaction as
follows:

oDB.AutoCommit = False
oDB.BeginTrans

And at the end of the section, I have the following:

If iError 0 then
oDB.RollbackTrans
Else
oDB.CommitTrans
End If

Pretty simple... but unfortunately it doesnt work.

All the help I can find only points to this code being correct... where am I
going wrong?

CJM
Sep 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
CJM wrote:
I'm using OO4O via ASP to manipulate an Oracle 10g database (v10.1.0.4).

At the start of each vbScript section I'm starting off the transaction as
follows:

oDB.AutoCommit = False
oDB.BeginTrans

And at the end of the section, I have the following:

If iError 0 then
oDB.RollbackTrans
Else
oDB.CommitTrans
End If

Pretty simple... but unfortunately it doesnt work.

All the help I can find only points to this code being correct... where am I
going wrong?

CJM

Can you show the full code? Have you checked the value of iError?

--

Niall Litchfield
Oracle DBA
http://www.orawin.info/services/
Sep 24 '06 #2

P: n/a
CJM

"Niall Litchfield" <ni**************@dial.pipex.comwrote in message
news:r7******************************@pipex.net...
>>
At the start of each vbScript section I'm starting off the transaction as
follows:

oDB.AutoCommit = False
oDB.BeginTrans

And at the end of the section, I have the following:

If iError 0 then
oDB.RollbackTrans
Else
oDB.CommitTrans
End If

Can you show the full code? Have you checked the value of iError?
Niall,

The full code wouldnt be any more enlightening - I've sliced & diced the
code, including cutting it down to single call to a package, followed by an
enforced Rollback - but it didnt make any difference. Modifications to the
data persist after a rollback. The rollback doesnt fail (ie kicking out an
error), it just doesnt roll the data back to the starting point. I've
included the code that creates the Sessions/DB connections below

This same example was modified to use ADO instead of OO4O and the
transaction handling worked as expected.

CJM

-- Global.asa:

<object runat="Server" scope="Application" id="oSession"
progid="OracleInProcServer.XOraSession"></object>
<script runat="server" language="vbscript">
Sub Application_OnStart
oSession.CreateDatabasePool 2, 40, 200, "DB", "uid/pwd", 0
End Sub
</script>
-- Near the start of each ASP page:

Set oDB = oSession.GetDatabaseFromPool(10)
oDB.AutoCommit = False
Sep 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.