473,382 Members | 1,329 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,382 software developers and data experts.

oracle transaction for stored procedure?

My application uses Oracle stored procedure to modify multiple tables.
but OracleClient does not support table-like arrays in one execution,
therefore, I need call many times of the stored procedure. In this
case how can I use transaction to rollback all the executions if there
is error in the middle of calls? What I found is that the previous
succussful calls already commit the modification in Oracle side, my
application-level transaction could not rollback those.

Any help?
Nov 15 '05 #1
1 9871
Henry,

I can think of two solutions. The first would be to access the
BeginTransaction method on the connection class that you are using. You
should be able to call this and begin a transaction on the database which
will be rolled back in the case of an error. This would return an
implementation of IDbTransaction. You can then call Commit or Rollback
depending on what happens.

Also, I believe Oracle is supported in COM+, which you can use to create
a serviced component. You can then set it so that the methods on this
component are transactional, in which case it will be handled automatically.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Henry" <we**********@yahoo.com> wrote in message
news:b6**************************@posting.google.c om...
My application uses Oracle stored procedure to modify multiple tables.
but OracleClient does not support table-like arrays in one execution,
therefore, I need call many times of the stored procedure. In this
case how can I use transaction to rollback all the executions if there
is error in the middle of calls? What I found is that the previous
succussful calls already commit the modification in Oracle side, my
application-level transaction could not rollback those.

Any help?

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jeff Lambert | last post by:
We have a Windows client application written in delphi that connects to Oracle 8i w/ ADO. We accumulate a lot of SQL statements in a loop and finally send the strings list to be executed. What I...
2
by: Deepak Mehta | last post by:
i have to update two tables from ASP pages with same data but i want that both of them should be updated at one time. If either of them is not updated then my transaction should roll back.I want...
2
by: Nelson Xu | last post by:
Hi All Does anyone knows how to pass an array from .net application to oracle stored procedure Thank you in advance Nelson
15
by: Zeng | last post by:
Hi, The bigger my C# web-application gets, the more places I need to put in the tedious retrying block of code to make sure operations that can run into database deadlocks are re-run (retried)...
0
by: Jim Heavey | last post by:
I have tested a procedure in TOAD and it functions as expected, meaning for this particular transaction it returns and error message and performs a rollback within the procedure. When I call...
6
by: Crash | last post by:
C# VS 2003 ..Net Framework V1.1 SP1 SQL Server 2000 SP3 Enterprise Library June 2005 I'm working with some code {not of my creation} that performs the following sequence of actions: - Open...
3
by: Fred Morrison | last post by:
Does DB2 have anything equivalent to Oracle's PRAGMA AUTONOMOUS_TRANSACTION that allows a stored procedure to BEGIN, COMMIT or ROLLBACK a totally independent transaction while possibly (but not...
14
by: ruediger.michels | last post by:
hi, 1. is there a statement in ms sql, what creates a sequence? cant find anything in web :-( -oracle: CREATE SEQUENCE XYZ INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20; -ms sql: ??? 2....
1
by: cricketweb | last post by:
I have a stored procedure that calls another stored procedure with the first stored procedure opening a transaction: BEGIN SET XACT_ABORT ON BEGIN TRANSACTION does various updates/inserts
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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...

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.