.NET
  Home arrow .NET arrow Page 3 - .NET CLR stored procedures within Oracle d...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

.NET CLR stored procedures within Oracle database: Another breaking revolution
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2005-12-06

    Table of Contents:
  • .NET CLR stored procedures within Oracle database: Another breaking revolution
  • Connecting to Oracle 10g (Release 2) from Visual Studio.NET using Oracle Explorer
  • Developing an Oracle based .NET CLR stored procedure using Visual Studio.NET
  • Testing an Oracle based .NET CLR stored procedure using Visual Studio.NET
  • Testing an Oracle based .NET CLR stored procedure using “iSQL*Plus”

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    .NET CLR stored procedures within Oracle database: Another breaking revolution - Developing an Oracle based .NET CLR stored procedure using Visual Studio.NET


    (Page 3 of 5 )

    Once you complete all of the steps in previous section, proceed with the following steps to develop a .NET CLR based stored procedure using Visual Studio.NET.

    • Go to File -> New -> Project
    • Within the “New Project” window, select “Visual Basic Projects” as Project Type “Oracle Project” as template, Name as “CLRSample” and click “OK” (shown in Fig5).
    • Modify the code as follows:

    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types

    Public Class Class1

        Public Shared Sub IncrementSalary(ByVal empno As Integer, ByVal incrementValue As Double)
            ' Add code here.
            Dim conn As New OracleConnection("context connection=true")
            conn.Open()
            Dim cmd As OracleCommand = conn.CreateCommand
            cmd.CommandText = "UPDATE scott.emp SET sal = sal + " & incrementValue & " WHERE empno = " & empno
            cmd.ExecuteNonQuery()
            cmd.Dispose()
            conn.Close()
        End Sub
    End Class
    • Press Ctrl+Alt+L to open “Solution Explorer.”
    • Right click on “CLRSample” project and select “Deploy” (shown in Figure 6).
    • Skip the welcome screen by clicking on “next.”
    • Select the “data connection” you already created (you can even create a new connection by clicking on the “New Connection” button) and click “next.”
    • In the next screen select the “Copy assembly and generate stored procedures” option and click “next” (shown in Figure 7).
    • Accept the defaults in the next screen (shown in Figure 8) and click “next.”
    • Accept the defaults in the next screen (shown in Figure 9) and click “next.”
    • Select all checkboxes in the “Available methods” (shown in Figure 10) and click “finish.”

    More .NET Articles
    More By Jagadish Chaterjee


       · Hello....Not only SQL Server 2005, you can also use Oracle to deploy your .NET CLR...
     

    .NET ARTICLES

    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT