472,353 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

OO4O Transactions: Updates not being rolled=back

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
2 2395
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rick | last post by:
I'm having problems with EnterpriseServices transactions running against Oracle 9iR2. I am inconsistently getting Oracle ORA-24761: Transaction...
1
by: Dan Anderson | last post by:
Will transactions do anything if I am connecting to a Unix socket on localhost? I know that if the wire is cut between a remote host while sending...
4
by: Re_endian_miss | last post by:
I know even less about databases than I thought... I always thought that the idea behind a transaction was that the actual table in question does...
4
by: Raposa Velha | last post by:
So, chosen the interface for my app, finally I got stuck with transactions. Boy!, how many ways of doing the same job are there?! Any suggestion so...
1
by: ljubo lecic via AccessMonster.com | last post by:
I am developing a complex ACCESS aplication. My question is: If I have A few update queries that are called within after-update event in the form(...
11
by: Mike P | last post by:
I've been using C# transactions for a while and had no problems with them. Using try catch blocks I can trap basically all possible errors and...
2
by: Andreas | last post by:
Hi, will I need "nested transactions" which - as I read - aren't implemented, yet ? I have some objects that rely on each other. Each has a...
7
by: Karen Hill | last post by:
Hi. I need to use transactions to make sure data is consistent. I have a combo box that when changed to a new value updates a table. I then...
1
by: holdingbe | last post by:
Hi, I exported dumps from windows machine to linux machines.I export dunps the successfully but during the import i got the error IMP-00009:...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.