Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

I have a .NET application that was working on my machine earlier , I tried to install an application that was working with previous version of Oracle , i have now unistalled this application but now my application fails with below mentioned error:-


After searching i found it might be due to two versions of oci.dll being present , is searched for it , and there was a mapped network drive having previous version and also path in env variables. I have disconected that drive and also removed that path from env variables. I have also uninstalled and installed Oracle Network Client again.

I am working on Windows 7 and using VS2005 .

I am stuck for 2 days with it ,
thanks for help in advance .

Thanks and Regards,
Shreyas

OCIEnvCreate failed with return code -1 but error message text was not available.
  
at System.Data.OracleClient.OciHandle..ctor(OciHandle parentHandle, HTYPE handleType, MODE ocimode, HANDLEFLAG handleflags)
   at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
   at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
   at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.OracleClient.OracleConnection.Open()
   at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DBCommandWrapper command, DataSet dataSet, String[] tableNames)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DBCommandWrapper command, DataSet dataSet, String[] tableNames)
   at Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.LoadDataSet(DBCommandWrapper commandWrapper, DataSet dataSet, String[] tableNames)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DBCommandWrapper command, DataSet dataSet, String tableName)
Posted
Updated 19-May-13 2:25am
v2
Comments
walterhevedeich 23-May-13 3:30am    
Looks like the only thing you can do is to revert to whatever configuration it was when the application was working.

Is your Windows 7 32-bit or 64-bit? Oracle has separate drivers for each, and if you've only re-installed the 64-bit drivers, 32-bit apps still won't work.
 
Share this answer
 
Hi,

I was able to solve it help of my friend.
When we unsinstall aind install a new version of OracleClient it takes a backup of old registry entries and creates new registry entries, so your oracle client starts pointing to a new path.
When you install back it installs but registry entried point to a new path

So evrytime you need to uninstall / install Oracle Client you need to take care of registry entries as well.
I renamed it back old folder in Registry to Oracle it started working
 
Share this answer
 

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