Hi,
I am trying to connect oracle with .Net 4.0. I have installed oracle 12.1.0 on windows 8.1 pro.It was working fine until i started getting error "OCIEnvCreate failed with return code -1 but error message text was not available" when I tried to create CreateConnection. Below is the code that is never changed.
DataWorker dw = new DataWorker();
dw.SetTypeOfDataWorker(CONNECTION_TYPE);
DataSet ds = new DataSet(RESULT_DATASET_NAME);
object[] parameters = new object[] {Field_Name, CifNo, SQL_DATA_TYPE.VarChar, RESULT_SET, "", SQL_DATA_TYPE.Cursor };
try
{
using (IDbConnection connection = dw.database.CreateConnection())
}
After that i reinstalled my oracle client and it started giving following error.
Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
I tried to connect using SQLPlus, it was working fine before and after re-installing the oracle client. Can anyone please suggest any solution for this. I have been facing this error for very long.
P.S: I am installing the same version again which i downloaded for the first time. I tried to install 32 bit client as well but its not even installing, setup is giving some error with no information about the issue.