473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 2481
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 Rolled Back results mid-transaction. If I start...
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 a transaction it can be rolled back, but what if...
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 NOT get updated until a commit is issued (either...
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 I could find myself in the right direction?...
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( queries updating another tables) I am wandering...
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 rollback all necessary data. Over the last few...
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 status like proposal, working, canceled. table-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 have a DoCmd.RunSQL statement following that in the...
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: abnormal end of export file IMP-00028: partial import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.