Connect Oracle with C#
In this tutorial, we'll show you how to connect a C# .NET console application to an Oracle database using dotConnect for Oracle and ADO.NET.
In this video, you'll learn:
- How to set up a new .NET console application in Visual Studio.
- How to install dotConnect for Oracle to enable Oracle connectivity.
- How to configure your Oracle connection strings.
- How to run and test your connection to the Oracle database within the application.
Learn how to integrate Oracle into your .NET projects with this easy-to-follow guide https://www.devart.com/dotconnect/oracle/connect-to-oracle-database.html
Find the code example mentioned in the video here: https://dotnetfiddle.net/ZjRzcY
👉 Check full overview of dotConnect for Oracle here: https://www.devart.com/dotconnect/oracle/
🔥 You can download dotConnect for Oracle trial here: https://www.devart.com/dotconnect/oracle/download.html
🔔 Subscribe to our channel and get dozens of tutorials about Devart tools: @DevartSoftware
Helpful search phrases:
Connect Oracle with C#
Connect Oracle Database with C#
C# connect to Oracle
C# connect to Oracle database
C# Oracle connection
C# Oracle connection example
Connect to Oracle c# visual studio 2022
How to connect Oracle in c# console application
Closed Caption:
[Music]
In today's video, we'll demonstrate how
to connectnet console application to
Oracle database using dotconnect for
Oracle. You have the option to choose
between a free trial and the full
version. The free trial lasts 30 days
providing access to all features. It's
not for commercial use and doesn't
require a license key. To begin, simply
download the installer from the Devart
website and install it. If you decide to
buy the full version, your activation
key can be found in the Devart customer
portal. To get started, you'll first
need to create a new console application
project in Visual Studio. Before we
start coding, let's take a quick look at
some data from the Oracle database.
Right click on data connections, then
select add connection. Input your Oracle
connection properties and click test
connection to confirm that everything is
set up properly. Keep in mind that the
connect for Oracle provides direct
access to Oracle without the need for an
Oracle client. It also supports
connection methods like SSH proxy and
more offering greater flexibility. Once
the connection is live, expand the
Oracle connection to see all the
available tables. For example, let's
open the tables to inspect its fields.
You can retrieve data from the tables to
review the structure of the data. Next
up, let's get the necessary components
to enable Oracle connectivity. Right
click on the solution explorer, select
the NuGet package manager, and manage
NuGet packages for
solutions. Search Devart data oracle and
click install.
[Music]
Your project is ready to work. Now your
project is all set up and ready to go.
In our case, we'll configure the project
by replacing the default code with a
pre-written script. In this script,
we'll set up the Oracle connection
string, which includes essential details
such as the host, service name, user ID,
password, and license key. Now in our
application, we're going to connect to
the database and retrieve data from the
employee tables. Once we run the
application, the console window will
display the result showing whether the
connection to Oracle was successfully
established and whether sample table
rows were fetched. Thank you for
watching this tutorial. We hope you
found it helpful. Feel free to share the
video with anyone who might benefit from
Video Length: 02:42
Uploaded By: Devart
Published: 4/11/2025
View Count: 1,126