Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when

f2eced94-f093-4db4-8d07-986f7a7b533cJul 10 2017 — edited Aug 24 2017

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.

This post has been answered by Alex Keh-Oracle on Aug 24 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2017
Added on Jul 10 2017
1 comment
5,176 views