System.Data.OracleClient requires Oracle client software version 8.1.7 or greater
- by sachin kulkarni
I have installed Oracle client version 10g on my PC(Registry ORACLE_BASE-D:\oracle\product\10.2.0).
I have added below references.
System.Data.OracleClient.
I am getting above mentioned error.
Below is the Code Snippet .
public static OracleConnection getConnection()
{
try
{
dataSource = new SqlDataSource();
dataSource.ConnectionString = System.Configuration.ConfigurationManager.AppSettings.Get("conn");
OracleConnection connection = new OracleConnection();
if (dataSource == null)
{
// Error during initialization of InitialContext or Datasource
throw new Exception("###### Fatal Exception ###### - DataSource is not initialized.Pls check the stdout/logs.");
}
else
{
connection.ConnectionString = dataSource.ConnectionString;
connection.Open();
}
return connection;
}catch (Exception ex)
{
throw ex;
}
}
Please let me know what are the areas of Concern and where Iam missing.I am new for the combination of Oracle and Asp.Net.