help for PLSQL with Asp.Net

 

Dear All,

i m using Oracle 9i database with C# Asp dot net. Scenario is i m executing both DELETE and INSERT command Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} Consecutively whenever user click the button, the record delete from table and insert new records at the same time.

now my problem is what, if delete process has been completed successfully or at the time of deletion the Network down or any Exception occurs then i want recover (ROLLBACK) all records and go to previous condition.

how can i do that?

NOTE : i m using PLSQL command not Stored Procedure.


Regards,

MF

0
mr_karachi92
4/28/2009 6:31:36 AM
asp.net.oracle 2269 articles. 0 followers. Follow

2 Replies
590 Views

Similar Articles

[PageSpeed] 9

You can use Transactions in this case. ASP.Net by default has a transaction associated with a Command. So in your case you can put the Delete query and then Insert query inside a Transaction. So once these two are done then you can Commit the transaction or else if something goes wrong you can easily Rollback the transaction


Cheers
Bino
www.codepal.co.in

Please Mark as Answer if you find the post useful.
0
binobose
4/28/2009 7:01:41 AM

In Pl/sql, you can use such a block to do that

begin
 insert ...;
 delete ...;
exception when others then
 rollback;
end;


Many Thanks & Best Regards,
HuaMin Chen

(Mark it as answer if it does help you!)
0
wmec
4/29/2009 1:56:33 AM
Reply:

Similar Artilces:

urgent: .NET Provider for Oracle or Oracle Data Provider for .NET
If I want to access Oracle DB in ASP.NET application, and I am using .NET Provider for Oracle or Oracle Data Provider for .NET, should I have to install OracleClient on my .NET server? Is there other choice? Thank you very much.Johnson Johnson2007:should I have to install OracleClient on my .NET server?  You have to options1. install the ODP.NET on your web serverOR2. put the oracle assemblies in your BIN directory   Hi jimmy,Thank you for you reply. Because I could not find a server right now, I should test it first before I agree or disagree with you, as most articles I...

Net:Net:Net::LDAP::FAQ
------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Help me pls. i wan't code for startup and shutdown oracle database with vb.net or c#.net
Help me pls. i wan't code for startup and shutdown oracle database with vb.net or c#.net In Windows, it would be easier to interact with Oracle by way of the service...  (I've not tried it myself, but this should work fine for a service installed on the same machine as the .net application:using System.ServiceProcess; ServiceController controller = new ServiceController(); controller.MachineName = "."; controller.ServiceName = "OracleServiceORCL"; string status = controller.Status.ToString(); // Stop the service controller.Stop(); // Start the ...

Return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle
Hello, I am wondering if anyone in this community knows the shorter way to return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle, something likereturn (IDataReader) SqlHelper.ExecuteReader(ConnectionString, "GET_ACCOUNT", Id); instead of using the way below (look at the C# code) Stored Procedure create or replace PROCEDURE "GET_ACCOUNT" ( p_ID IN ACCOUNT.ID%type, retCursor OUT SA.MYGEN.sqlcur ) IS BEGIN OPEN retCursor FOR SELECT ID, NAME FROM ACCOUNT WHERE ID = p_ID ; ...

which is shou i use? Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NET
Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NETI am confused?Which is better or which one should I use?BTW, I am going to use .net 2.0 with oracle 9. Can anyone tell me what shou I use for working with oracle database?Thanks very much in advance!Justin Oracle's data provider has more functionality than Microsoft's.If your doing transaction processing you can have SAVEPOINTs, which Microsoft's data provider does not provide.Also, Oracle has PL/SQL Associative Arrays which are very powerful.Oracle also allows you to bind parameters by name and pos...

To .NET or not .NET, that is the question
I'm running WinXP pro 32-bit, meaning I've got the version 1-dot-something of .NET that XP came with. I've been looking for various softwares, and more and more often come across .NET version 2 being prerequisite. No urgency for me re. my questions to this group - so far I have just decided to hit the red X on those download pages - but the desire for this newer version of .NET seems to be growing for me. Firstly, according to my (limited) research, newer .NET versions are inclusive of the previous ones, and the current version seems to be 3.5. So if I go for i...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Net Farmers net
Has anyone been able to access any of the tests at http://suicide.netfarmers.net ? I can get the default page but none of the tests appear to be operating over the last several weeks. -- CK I just tested and works as usual!!!Every session TCP_error,because my Shields_guard is intact<<G>> -- Regard: Joh@nnes� 1216771 Ont.Inc. "Nothing is more damaging to a new truth than an old error" "CK" <ckphalon@lascenltd.com> wrote in message news:9i45gg$1qa9$1@news.grc.com... : Has anyone been able to access any of the tests at : http://suicide...

net send in .net
Hi,  I am trying to execute net send comman in my vb.net code. But I am getting "win32 exception unhandled error". Please help me. My code is:Dim psi As New ProcessStartInfo() psi.UseShellExecute = False psi.FileName = "Net send" 'xxx.xxx.xx.xx  - IP address of a system in my network psi.Arguments = "xxx.xxx.xx.xx test" Process.Start(psi)  Thanks in advance! Shwetha Tryu changing   psi.FileName = "Net send" 'xxx.xxx.xx.xx  - IP address of a system in my network psi.Arguments = "xxx.xxx.xx.xx test&quo...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

Installing ODP.net Docs into .Net Framework Help
Does anyone know how to go about installing the ODP.Net Help files into the .Net Framework help system? I know it just works with Visual studio. It seems i may need to generate a HxI file for the system. I have no idea how to go about this....

OleDb.Net vs. ODBC.Net Connection to Oracle
I want to connect to an Oracle database, and I understand that I can use either the OleDB.Net data provider or the ODBC.Net data provider for my connection. Does it matter which one I use? What are the advantages and disadvantages of each? Would appreciate any input. ODBC is slower than OleDb. because ODBC has to talk to OleDbProvider then OleDbProvider will talk to Oracle Db. Instead if you are able to use OleDb straight to DB then it will be faster. If you only have THOSE choices, I would take OleDb over ODBC any day. If you are using Framework 1.1, you have the choice of using th...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

Looking for help with Net::SSH::Perl & Net::SFTP
I recently took over ownership of these two modules because they were causing problems with Bricolage, and it had been 2 years since the last releases. However, I'm not an expert in either of these protocols, nor in networking in general, so if someone out there is interested in helping work on these modules, please let me know. I've set up an SF project for it, and there's a mailing list (https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users). I'm waiting for the original maintainer, Benjamin Trott, to give me the CVS repos of these projects so I can have...

Web resources about - help for PLSQL with Asp.Net - asp.net.oracle

EMPLEOS JOBS Y NOTICIAS EN SELFOR21
Trabajos que Selfor desea cubrir y noticias de interés respecto a Recursos Humanos, con el propósito de comunicarlos a los Profesionales que ...

IT and Telecommunications Jobs in Sydney Metro - MyCareer
Find IT and Telecommunications Jobs in Sydney Metro on MyCareer. Fresh IT and Telecommunications Jobs posted daily. Free email alerts and salary ...

Scrum Developers Resources & References - Agile Pain Relief
This resource is new and under continual improvement. Please let us know if you experience any bugs or issues.

Terms and Conditions
Welcome to the American Girl Web site (the "Site"), currently located at http://www.americangirl.com . Please read the following rules and understand ...

Senior Programmer Analyst - J2EE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Senior Programmer Analyst - J2EE job in Fairlawn, Ohio, US. Read the Senior Programmer Analyst - J2EE job description and find other Kforce Professional ...

Adam Renardson, Media Production
Adam Renardson, Media Production: The authoritative source of Adam Renardson's personal information, links, and social activity.

Query Analyst (Intermediate) - Discovery Health Systems (Claims , South Africa - Careers24
... will also be required to participate in the preparation, analysis and summation of ad-hoc report requests, using tools including SQL / PLSQL. ...

The Big Rewrite
You’ve got an existing, successful software product. You’ve hit the ceiling on extensibility and maintainability. Your project platform is inflexible, ...

Oracle Tips
Oracle News for the professional

Free Java Tutorials & Guide - Java programming source code
Free java guide website to learn Java programming through examples. Beginner's tutorials of plsql and sql with java source code

Resources last updated: 12/30/2015 8:27:15 AM