This content has been marked as final. Show 17 replies
The most common error I've seen with the connection object and the message it has is "The provider is not compatible with the version of Oracle client". This is when you have the managed ODP.NET DLL using the wrong unmanaged ODP.NET DLLs version. Generally, this occurs when you have more than one Oracle Client installed on your machine and the wrong DLLs are first in the Windows PATH. The fact that you don't get any message returned does not help in pointing us in the right direction.
If you do have more than one Oracle Client installed, you may as well try setting your DllPath setting to point to the correct version of the unmanaged DLLs.
Can you connect to the Oracle DB via SQL*Plus? If you can't, that means the issue probably isn't with ODP.NET, but something more fundamental. If you can, then it's more likely an ODP.NET issue or configuration issue.
Thanks that was very much useful.
You are right I have more than one Oracle Client installed.
sql+ is working fine and application fails to connect the DataBase from same server box.
I have added the below section in the APP.config but still I am getting the same error.
<add name="DbNotificationPort" value="-1"/>
<add name="DllPath" value="D:\oracle\product\10.2.0\client_2\bin"/>
<add name="DynamicEnlistment" value="0"/>
<add name="FetchSize" value="131072"/>
<add name="MetaDataXml" value="CustomMetaData.xml"/>
<add name="PerformanceCounters" value="4095"/>
<add name="PromotableTransaction" value="promotable"/>
<add name="StatementCacheSize" value="50"/>
<add name="ThreadPoolMaxSize" value="30"/>
<add name="TraceFileName" value="c:\odpnet2.trc"/>
<add name="TraceLevel" value="0"/>
<add name="TraceOption" value="0"/>
I see the below configuration is Registry
Our Application has Oracle.DataAccess.dll Version 18.104.22.168
Please let me know whats should be my next move.
Ah! You're using ODP.NET 10.2.0.2.20. The first version of ODP.NET that supports DllPath was 10.2.0.3. You're going to have to indicate where to find the unmanaged DLLs using the Windows Path setting.
In the Windows Path, move "D:\oracle\product\10.2.0\client_2\bin" to the front. Unload any application currently using Oracle.DataAccess (or reboot) and re-run your application. It should run fine now (hopefully).
In your Windows Path setting, you'll see a list of directories separated by semi-colons. Somewhere near the end of the Path setting, you'll see: "D:\oracle\product\10.2.0\client_2\bin". Move that to the front of the Path, rather than at the end.
How Windows looks for DLLs is that it looks in the Windows Path directories starting with the first directory and works its way to the last directory looking for the DLL a process is trying to use.
I'm still going by the assumption that you are picking up DLLs from the wrong Oracle Home. Can you download dependency walker (depends.exe) and see where Oracle.DataAccess.dll is getting its dependent DLLs from?
They should all be coming from that specific Home bin directory. If not, some other process is loading some Oracle DLLs before you can launch your application. If a DLL is already in memory (or in the current working directory), the Windows Path won't be used.
If my assumption is wrong, then I would advise opening up a support ticket. Basically, I'm guessing that you're hitting a common error situation, but you may not be. Having no diagnostic information makes it a guess and check situation.
Thanks for your quick reply Alex,
I am new to oracle
I need a help from you Alex , Can you please tell me how to use ODP.Net in Visual Studio 2005 Professional Edition, .Net Framework 2.0 , C#.
This is my question link i posted before OracleDataProvider For .Net not in DataSource list in Server Expr VS 2005
Thanks .waiting for your replies