How to connect to oracle database from Visual Studio 2023

How to connect to Oracle Database from Visual Studio

Prerequisites

Installation of Oracle Data Access Components

  • First Download the ODAC from https://www.oracle.com/database/technologies/dotnet-utilsoft-downloads.html
  • To install this ODAC, need to have Visual studio 2017 Professional latest version
  • Oracle Developer Tools for Visual Studio is required to enable Visual Studio data features such as Server Explorer integration, TableAdapter Configuration Wizard and Entity Designer. It also adds useful Oracle specific features. Visual Studio 2017 Community Edition is currently not supported with Oracle Developer Tools. We will support it in our next release!
  • Download the ODTwithODAC software bundle into a temporary directory:

Unzip the package and run setup.exe. During the installation please note the following important details:

  • Close any running instances of Visual Studio before installing
  • Click Nextand choose Use Built-in windows Account.
  • If you already have Oracle software installedinstall into a new “Oracle Home” software location (eg. a new subdirectory)
  • Click Next.
  • Leave Defaults and click Next.
  • Choose to install “Product Components” Oracle Data Provider for .NET and Oracle Developer Tools for Visual Studio
  • When prompteddo NOT choose to install Oracle Data Provider for .NET on a “Machine Wide Level“. Click Next.
  • Click Next, and Click install
  • Wait for some time till installation completion

Oracle Developer Tools for Visual Studio from https://www.oracle.com/tools/technologies/quickstart-dotnet-for-oracle-database.html

Installation of Oracle Managed DataAccess Client

  1. Once installation is done, check under data source -> Oracle Database
  2. Check Under Data provider -> NET, Managed Driver
  3. Go to project and right click on it and select manage nuget packages and install installManagedDataAccess.Client
  4. Next Step is, In project Reference (right click add reference -> Extensios -> Oracle.DataAccess)

Leave a Comment