473,718 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.RollbackTra ns
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 2501
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.RollbackTra ns
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.c omwrote in message
news:r7******** *************** *******@pipex.n et...
>>
At the start of each vbScript section I'm starting off the transaction as
follows:

oDB.AutoComm it = False
oDB.BeginTra ns

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

If iError 0 then
oDB.RollbackTra ns
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="Applicat ion" id="oSession"
progid="OracleI nProcServer.XOr aSession"></object>
<script runat="server" language="vbscr ipt">
Sub Application_OnS tart
oSession.Create DatabasePool 2, 40, 200, "DB", "uid/pwd", 0
End Sub
</script>
-- Near the start of each ASP page:

Set oDB = oSession.GetDat abaseFromPool(1 0)
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
4197
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 the transaction and run it against an object it might fail. If I rerun the same transaction again it might work. But on trying again it might fail. If I disable transactions <Transaction(TransactionOption.Disabled)> the app runs and all the data...
1
1276
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 lightning hits the computer? Is it a good idea to do anyways or a waste of time? Thanks, Dan
4
7007
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 implicitly or explicitly). However, when I create an "after update" trigger on table X, and then perform an update inside of a transaction, the trigger fires IMMEDIATELY, even before I issue the commit or rollback. Is this a quirk of DB2? Is...
4
2229
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? Pasting some code would be appreciated. My goal is updating several tables and rollback if any of the updates fail. Not much, hmm? I've seen in this NG may discussions (I even gave a try on the MS Access help, what a loss of time!!!) but couldn't...
1
1265
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 if the update of the current table and updates done by updates queries are regarded as ONE transaction in ACCESS(all done or nothing). For example, If there is power loss in the middle of my updates queries I wander If all previous updates are...
11
12991
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 days I've been trying to convert some of this code to SQL Server stored procedures, but it seems to lack many of the benefits of C# transactions - a lot of the errors don't seem to be trapped by the SQL error trapping (e.g. if I do an update on a row...
2
1907
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 <--- table-B <--- table-C <--- table-D
7
2477
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 same Sub. I would like for it for those two things to be wrapped up in one transaction, with the user being informed that a transaction has rolled back. I have not implimented transaction in Access so code bits would be helpful to me. I am...
1
8981
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 of previous table rolled back: 2255968 rows rolled back I transfer the dumps from windows to linux machine using FTP use binary modes. my export command:
0
8827
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8722
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7985
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6652
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5971
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3180
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2122
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.