logo for asktheoracle.net
leftimage for asktheoracle.net

Integrating Oracle Databases With Microsoft .NET Apps

The .NET Framework has been around for over 10 years now and is therefore a market that Oracle can't ignore so it's little surprise that the company makes it easy for its flagship database to be easily integrated with dot NET applications.

Support is provided in the following 4 areas:

  1. Database Extensions
  2. Providers for ASP.NET
  3. Data provider
  4. Oracle Developer Tools for Visual Studio (ODT)

Let's take a look at each of these in turn.

Database Extensions

The database extensions provided enable dot NET procedures to be stored in the database just like Java and PL/SQL procedures. The stored (server-side) code is no different to client-side code and can therefore be deployed on the client or the server without requiring any changes to the source code.

Once stored in the database, procedures can be invoked from any other stored procedure (of whatever type), from application code, from a trigger or from anywhere else a call to a stored procedure or function is valid.

Oracle Tips & Tricks to SKYROCKET Your Career!

If you're not already a subscriber you're  missing out on a myriad of tips and techniques to help you become a better, faster, smarter developer. Subscribe now and ignite your career.

Providers for ASP.NET

Oracle provides a set of 2.0 provider model compliant providers for ASP.NET to enable storage of the application state. The new 11g providers include:-
  • a web event provider
  • a personalisation provider
  • a user-profile provider
  • a session state provider
  • a membership provider 
  • a site map provider
  • a user-role provider
Follow the link for a tutorial on using Data Provider with an ASP.NET application.

Data Provider (ODP.NET)

This layer of code sits between the application and the client connectivity software.  ODP.NET provides standard ADO.NET data access as well as enabling the use of database-specific features including Active Data Guard,  Virtual Private Databases, Real Application Clusters (RAC), XML DB, data access performance optimizations, and Real Application Clusters connection pooling.

ODP.NET for 11g provides features including
  • load balancing with RAC
  • connection pooling for RAC
  • fast connection failover with RAC
  • support for SecureFiles (the file system within the database for non-data files)
  • caching of statements, results and meta data
  • PL/SQL support including stored procedures and all data types which can be mapped to .NET custom data types
  • Support for virtual private databases (VPD) and Label Security
Follow the link for an introductory tutorial on using ODP.NET with a WinForms.NET application and this link for a more advanced tutorial.

Oracle Developer Tools for Visual Studio (ODT)

This set of plug-ins for Visual Studio was first released in 2005. Architecturally, ODT comprises multiple tools, each of which addresses a specific developer need.

The 11g release of the tools include a tree-like interface to the  database to display schema objects and provide context-sensitive menus that launch other tools to enable the creation/modifcation of the select database object type. Other facilities provided include
  • a data window for accessing/modifying table data
  • auto code generation when database objects are added to Visual Studio forms
  • full PL/SQL editing and debugging
  • source control integration
  • a SQL script editor with an in-built SQL execution engine 
  • integrated help system
  • a SQL Query Window for running ad hoc SQL scripts
The 11g version of ODT can also be used against previous releases of the database running on any supported platform.

For full details see the .NET developer center on the Oracle web site