I have visual studio 2012 and Oracle 11g and want to connect oracle database using OPD.NET .I downloaded the
ODAC112040Xcopy_32bit zip file and un zip the file and click the intall.bat and configure.bat then I Open the visual studio 2012 and add refrence
ODAC112040Xcopy_32bit\odp.net4\odp.net\bin\4
Oracle.DataAccess.DLL
and add in DAL.CS file using Oracle.DataAccess.Client;
but the type or namespace oracle could not found.Please guide me How I solve this problem
You can install ODP.NET via NuGet. Right click on solution and click on Manage Nuget Packages
and Search for ODP.NET
. You can choose Oracle.DataAccess.dll
or Oracle.ManagedDataAccess.dll
depending on your need.
You can use Package Manager console to install what you want
PM> Install-Package odp.net.managed
If you are using Oracle.DataAccess.dll
for your build then make sure your server environments have oracle client installed. If you really want to get rid of the version conflicts for Oracle.DataAccess.dll
between your build version and server then better rely on Oracle.ManagedDataAccess.dll
which you can deploy under your bin
folder of your application.
Have you installed the Oracle Client. You would have something in a directory like C:\app\oracle\product\11.2.0\client_1 Oracle installs some dll's and things in the gac that is required as well as the odp.net stuff I believe. Does ODP.NET require Oracle Client installation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With