Last post Sep 15, 2011 10:28 PM by Lannie
Sep 14, 2011 09:01 AM|Galvin|LINK
I am very new for oracle connection. I have oracle 10g and i am using C# code to connect with oracle using the ADO.net. But i am unable to connect with oracle. I am getting some error. The ERROR is : " System.Data.OracleClient requires Oracle client software
version 8.1.7 or greater."
see this is my code:
I added the reference.
string connectionString = "Data Source=192.168.0.91; User id=sys; Password=oracle123;";
string queryString = "SELECT CUSTOMER_ID, NAME FROM scott.emp";
using (OracleConnection connection = new OracleConnection(connectionString))
OracleCommand command = connection.CreateCommand();
command.CommandText = queryString;
OracleDataReader reader = command.ExecuteReader();
catch (Exception ex) // Here the error is : " System.Data.OracleClient requires Oracle client software version 8.1.7 or greater."
Please tell me the solution.
Sep 14, 2011 09:50 AM|Prashant Kumar|LINK
As the error states, you need the Oracle client software to be installed on the server. ADO.Net uses the Oracle client software to connect to Oracle.
This has step by step procedure
More info here
Sep 14, 2011 12:29 PM|Lannie|LINK
If the LAN IP address is your development workstaition, you might have missed Orace's recommendation to install ORacle on a STATIC IP on a virtual Microsoft Loopback Adapter (see Oracle windows installation guide) with your DNS as 127.0.0.1.
Do not use the deprecated System.Data.OracleClient , instead use Oracle.DataAccess.Client ODP.NET (ODAC)
If Oracle 10 g is installed on the same computer as your application, then download Oracle ODP.NET 11gR2 and do the Database installation when prompted.
If Oracle 10g is on another computer in the LAN, then install the Oracle ODP.NET 11gR2 on the application computer but select the Client installation when prompted.
Sep 15, 2011 05:25 AM|Galvin|LINK
See the situation like this:
Actually My PC is in LAN. In my Machine windows XP service Pack2 and .net 3.5 is Installed. One more Machine is there in LAN. In the second Machine Linux is installed and Oracle 10g both. So just i want to connect with the Linux machine and access the database
in my Machine. But in My machine Oracle 10g is not installed at all. So how can i make connection form the Other Linux Machine. If i connect with the machine I am geeting an error like "System.Data.OracleClient requires Oracle client software version
8.1.7 or greater."
So please tell me the pre-requisite what ever required in my machine.
Sep 15, 2011 10:28 AM|Prashant Kumar|LINK
Install Oracle client on your machine by following the steps given in the posts above. Once Oracle client is installed on your PC, you'll be able to connect to the Oracle on linux.
Sep 15, 2011 10:28 PM|Lannie|LINK
You can do the ODP.NET (ODAC) Client install WITH or WITHOUT the Visual Studio Tools. (You are prompted to select Client install at the beginning of installation prompts.
I prefer WITHOUT visual studio tools as I find that environment restrictive and at times buggy.