Sign in to follow this  
Alkan

Problem with oci library

Recommended Posts

Alkan    224
Hello

At work i had to make a small application in C++ on Windows (using Visual Studio 2008). This application uses Oracle OCI library to communicate with Oracle server. I'm using the 10.2 version of the client library. When i run the application from my development environment (from VC) or on my Desktop, it works just fine. However, as soon as we install the application using an installshield it can't connect to the server. After searching the error message, it appears it is not able to find the service name. But the client is configured correctly and the tnsname.ora file is fine. The application is compiled in 32 bits mode because it uses a 3rd party library which is only available for 32 bits. It probably has nothing to do anyway. It seems to be doing that only on Windows 7 and not on Xp. Haven't tried Vista or others.

P.S.

I know that may not be the best place to ask such a question but i think there may be people who would know. Edited by Alkan

Share this post


Link to post
Share on other sites
Laval B    12387
Does your installshield place the executable file in Program File (x86) ? If so, this is likely to be your problem. When OCI is loaded, it gets the current directory and composes all the paths to find other files it needs like <oracle_home>/network/admin where your tnsname.ora is. Unfortunatly, oci libraries before version 11 have a bug with string having parenthesis and can't compose their internal paths right in that case. The solution is either install your application in another directory or use version 11.2 of the library. Edited by Laval B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this