I searched for this for a long time, I developed a Windows Forms application using C # that needs to connect to an Oracle database, this application will be used on many PCs using Windows XP and Windows 7. After much research, I found that I need to use OBP. net to access the oracle, but the problem is that I cannot install the oracle client on every PC. However, I found work in CodePorject Example to load 5 DLL files to do the same job
OCI Instant Client Data Shared Library oraociicus10.dll (Basic-Lite version) oraociei10.dll (Basic version) Client Code Library oci.dll Security Library orannzsbb10.dll OCCI Library oraocci10.dll
But when I launch the application, it will connect to the Oracle Database. Please help, how can I connect the Windows Forms application to the Oracle database without the oracle client installed on the computer, and if this is possible through the aforementioned DLLS, how can I do this?
EDIT:
DataTable dt = new DataTable(); OracleConnection Oracle_connection = new OracleConnection(); Oracle_connection.ConnectionString = con; Oracle_connection.Open();
Received connection timeout, in Oracle_connection.Open(); in debug mode, and I am not using TNSNAMES.ORA since my connection string is
Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.2.54)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = PRD))) ;User Id=catering;Password=catering;"`
Tried to publish code that it worked on a Windows 7 PC, but didn’t work on a Windows XP System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize() System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
I don't know if this is related to windows or some DLLs
source share