Link to home
Start Free TrialLog in
Avatar of merianom
merianom

asked on

Oracle Client compatibility

I have two databases  on two different machines, lets call them A and B both of which are Oracle 11g.  I am running a vb.net app from  machine B.  This application must connect to both A and B databases.  My question  is about the client software install.  I know that the oracle server install includes all the necessary dlls to act as a client as well however, I cannot get my application to communicate with the databases. I am using the Oracle.DataAccess.dll which is in the same folder as my exe but I also did a search and found it in the oracle folder of both machines. I thought as long as the client dlls were on the same machine as my app that I could communicate with any database. How come my application cannot communicate with the local database?  Any help would be appreciated, I am in a bit of a time crunch.

Forgot to mention:  I am getting a TypeInitializationException.  The provider is not compatible with the version of Oracle Client

Thanks
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

You need the same version of Oracle.DataAccess.dll that your app was compiled with.  Right click and select properties the nversion.

You will need to install that version of the Oracle client on the app server or recompile your app to use the Oracle ODP.Net version installed on the app server.
Avatar of merianom

ASKER

I compiled my app with the instant client version of the DataAccess.dll ( 2.112.1.2) and the version on the server is 2.112.1.0.  I thought the versions were all compatible? Shouldnt it still work since the version I compiled my app with is in the same folder as my app executable?

Thanks for responding so quickly
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am in the same boat with .NET.  I know just enough.....
The .exe and the dll are in the bin folder however, I use a setup project to deploy the app which places the dlls and the .exe in a folder of my choosing.  

My issue with the versions is that I am not sure which version of the Oracle.DataAccess.dll they are going to have on the target machine.
I've never really gotten ODP and .Net to play nice unless I'm using the same versions.  You will likely need to specify the Oracle client version.

Any reason you just don't use SQL*Loader to load flat files and do away with the app all together?  For the most part SQL*Loader control files work across different versions of Oracle (unless there are new or deprecated features).
My application does many things, one of which is to extract data from Oracle on demand. So basically even though I am using running my application on the same machine as an Oracle server, I have to install oracle client so that I can dictate  (or in other words make sure) that the end user is using the correct dll versions?
If you cannot match the end users version, installing a separate client is what I'm thinking.

Unless another Expert stops by and has any other information that might work.  I'll add a few more Zones.
Thank you.  I appreciate all your info.  I will try to do the client install on the target machine and see what happens.  I will update when I know more

instead of doing the client install on the target machine.  I copied the Oracle.DataAccess.dll from the target machine to the development machine and rebuilt my application.  As i suspected it worked without any issues.  I guess my next step would be to figure out if I can control which version of the server is installed on the client.  

The other direction would be to install the correct client with my application.  Does anyone know if this is possible?  

Thanks again for all your help
If you can figure out a way to have the MSoft installer call another program, Oracle has a silent install option.  This allows you to install Oracle products form a command line without a GUI.

I've never used the silent installer nor do I know if the Instant Client will install silently but you can read up on the options and see.

http://download.oracle.com/docs/cd/E11882_01/install.112/e10844/advance.htm#CHDICDJA