Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater. That error occur when it try to do con.open().
The code is written in VS2008.
Oracle DB runs on the linux system in the VMware Workstation which is installed on my machine.
(PS: I connect to the Oracle DB successfully using pl/sql developer software).
Pls help, thanks.
The code is:
C#
public void TestReturnProcedureWithReturnValue()
{
    OracleConnection con = new OracleConnection();
    con.ConnectionString = ConnectionString;
    OracleCommand cmd = new OracleCommand();
    cmd.CommandText = "sp_pro9";
    cmd.CommandType = System.Data.CommandType.StoredProcedure;
    cmd.Connection = con;
    cmd.Parameters.Add(new OracleParameter("spNo", 10));
    OracleParameter cursor = new OracleParameter();
    cursor.ParameterName = "p_cursor";
    cursor.OracleType = OracleType.Cursor;
    cursor.Direction = System.Data.ParameterDirection.Output;

    cmd.Parameters.Add(cursor);

    try
    {
        con.Open();
        cmd.ExecuteScalar();
    }
    catch (Exception e)
    {
    }
    finally
    {
        con.Close();
    }



}
Posted

 
Share this answer
 
Comments
virusx1984 3-Sep-13 19:22pm    
I had seen that answer. The problem is that the Oracle DB is install on linux in the Virtual Machine using VMware Workstation software of my machine, so I can't found the found the ORACLE_HOME folder on my machine.
1.Download instantclient-basic-win-x86-64-11.2.0.1.0.zip and instantclient-odbc-win-x86-64-11.2.0.1.0

2.Install them

3.Add User Data Source in ODBC. done!
 
Share this answer
 
Comments
virusx1984 15-Oct-13 10:43am    
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900