Problem using Oracle in my code.

  • Thread starter Thread starter Mr. X.
  • Start date Start date
M

Mr. X.

Hello.
(I have asked this before in this forum.
Now I got new exception on some other circumstances) :
=====================================

VS 2008. Windows 7.

I have installed the driver for Oracle.
I succeed installing driver for : Oracle.DataAccess.Client
(Site : http://www.oracle.com/technology/software/tech/dotnet/utilsoft.html,
file : ODTwithODAC1110720.zip)
I ran the setup.

When running I got an exception :
(By create an instance by :
....
DbProviderFactory dbf;
....
dbf = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
The exception :
Unable to find the requested .Net Framework Data Provider. It may not be
installed.
)

On other circumstances I got the message, when just declaring reference
using Oracle.DataAccess.Client,
and the following line :
OracleConnectionStringBuilder csbOracle;

is excpetion (Why?) :
Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20,
Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its
dependencies. The system cannot find the file specified.

Thanks :)
 
Hello.
(I have asked this before in this forum.
Now I got new exception on some other circumstances) :
=====================================

VS 2008. Windows 7.

I have installed the driver for Oracle.
I succeed installing driver for : Oracle.DataAccess.Client
(Site :
http://www.oracle.com/technology/software/tech/dotnet/utilsoft.html,
file : ODTwithODAC1110720.zip)
I ran the setup.

When running I got an exception :
(By create an instance by :
...
DbProviderFactory dbf;
...
dbf = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
The exception :
Unable to find the requested .Net Framework Data Provider. It may not be
installed.
)

If the db provider factory is not defined in machine.config, then you
need to define it in app.config!

Arne
 
Well, I first time installed Oracle.
I don't know whether the link I gave is the right one.

For machine.config (is it on :
C:\Windows\Microsoft.NET\FrameWork64\v.2.0.50727)
(I see both the following on FrameWork & on FrameWork64)

<add name="OracleClient Data Provider"
invariant="System.Data.OracleClient" description=".Net Framework Data
Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory,
System.Data.OracleClient, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />

I see that the above is declared automatically (also ODBC, MySql, OleDB, and
Oracle).
It is only problem with Oracle, while other DBs act just fine.

Maybe this problem related to installation?
What should I install?

Thanks :)
 
Well, I first time installed Oracle.
I don't know whether the link I gave is the right one.

For machine.config (is it on :
C:\Windows\Microsoft.NET\FrameWork64\v.2.0.50727)
(I see both the following on FrameWork & on FrameWork64)

<add name="OracleClient Data Provider"
invariant="System.Data.OracleClient" description=".Net Framework Data
Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory,
System.Data.OracleClient, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />

I see that the above is declared automatically (also ODBC, MySql, OleDB,
and Oracle).
It is only problem with Oracle, while other DBs act just fine.

Maybe this problem related to installation?
What should I install?

System.Data.OracleClient is the MS Oracle provide.

You are using the Oracle Oracle provider Oracle.DataAccess.Client.

But you can add that to your specific app.config (or web.config if
it is a web app).

Arne
 
Back
Top