Oracle Database connectivity issue with C# and running fine with Delphi-7 - c#

The scenario is-
Delphi-7 is installed on my PC with ODAC, and my application is compiled by using ORA.dcu and is running on client's PC without installing Oracle Client on that PC. My C# application is using oracle-client.dll and running fine on my PC and one of my Client PC where I installed Oracle Client but it is not running on the PC where Oracle Client is not installed. This is not feasible solution to install Oracle Client on each client's PC.
Kindly suggest why Oracle client is required for C# exe on Client PC whereas Oracle Client is not required with Delphi-7 exe?
Can I use another library with C#?

Related

How can I Install C# desktop app with SQL Server database on client machine without installing SQL Server

I have a desktop app developed in C# with SQL Server and I want to deploy the app on client Machine.
How to compile the app into setup files?
I have SQL Server Express installed on client machine.
When you compile the app you will need to have the connection string to the database that exist on the client machine. Also ensure the correct tables and what not are in there too. You can compile the app for release by right clicking the solution and then clicking publish. You can then publish a release version for production that can be used on client machines.
You will have to do this for every client machine.
Some options to make this easier might be as follows:
Create a shared instance of SQL Server that all clients can connect to
Use a nosql solution like litedb or something else.
Store the data locally in another fashion.
Hope this helps! Leave comments if you are confused on anything.

Oracle EXE application runs on developer PC but not on other users' PCs. Why?

I am developing a Windows application that connects to Oracle DB.
The machine I am developing the application on has Oracle 6i installed with SQLPlus and Toad to access Oracle by command or graphical interface.
The same set up is true across all other computers in my work place.
The only difference is that my pc has Visual Studio and Oracle 10g ODP.Net libraries to make the development of Oracle Application possible using Visual Studio.
I made sure to include Oracle.DataAccess.dll file along with the EXE in the same path to reduce dependency on default paths/ etc.
The finished EXE file runs as expected on my computer, but whenever I publish it to the other computers, I get the following error message:
The type intializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.
I tried to change the version of Oracle.DataAccess.dll from 2.111.6.20 to 10.2.0.100.
Again, it ran perfectly on my PC but gave the following exception on other PCs:
Unable to load DLL 'OraOps10.dll': the specified module could not be found.
I copied the said file above from my pc and included it in the published folder of the EXE but the same error message appeared, as if it invisible to the .Net application.
All computers have Windows 7 and all of them are 32bit.
Is there a way to make the application connect to Oracle regardless of the libraries or Oracle version installed locally on the computer? (The same way Toad works whether it detects Oracle 6i or 10g installed)?
I can't install the Oracle 10g ODP.Net libraries on all computers.

Check oracle client installed in the local machine

We have a C# winforms application running in .Net 2.0. In this application we want to enable some options by checking whether any Oracle client is installed in the local machine.
After googling i found some suggestions like try to start the process "tnsping.exe". While starting the application if it throws some exception means Oracle client is not installed in that machine. I got this information from this SO post.
But I think in this case it will start the client application.
So i want a way to check Oracle client is installed in the local machine without starting the client application. I am not aware of this oracle installation and all. Can someone help me on this.
Thanks

Installing MS SQL 2005 drivers for IIS 7.5 .NET apps

I don't normally do .NET development but I have a small .NET app that I need to set up on a new Win2K8 IIS 7.5 server, the SQL 2005 server is on a different box. I've tested the .NET app on an Win7 IIS 7/SQL 2005 machine and it works fine. When I run the app on the new server I get the following error:
The 'SQLNCLI11' provider is not registered on the local machine.
I googled the error and found out that I needed to install the native client drivers. I found the sqlncli.msi file on the database server and installed it on the IIS server. Same problem.
I then installed the SQL Management Studio thinking that might have some drivers that it needed. Same error. I can connect through the management studio but the .NET app keeps giving me the same error.
Any suggestions?
Thank!
I changed the provider in my connection string from SQLNCLI11 to SQLNCLI10.
Works like a charm.

Error connecting to oracle on windows 7 machine

I've a .net 3.5 windows application which uses System.Data.OracleClient dll internally for Oracle database connectivity.The app works fine on a Windows XP machine.
When I port this application on a machine having Windows 7 OS,I get an error message when connecting to db:
"System.Data.OracleClient requires Oracle client software version 8.1.7 or greater."
This is fixed after installing Oracle 64 bit driver.But now am getting another error message:
"OCIEnvCreate failed with return code -1 but error message text was not available."
What could I be missing here please?
Thanks.
The System.Data.OracleClient actually requires Oracle client software to be installed on the client system, so you probably have it installed on your XP machine but not on your Windows 7 machine.

Categories