OraOLEDB.Oracle provider is not registered on the local machine

后端 未结 12 1897
梦如初夏
梦如初夏 2020-12-01 09:13

I just migrated from XP to Win 7. I am guessing this error has to do with switching operating systems. I wrote a .net application that basically massages a large amount of d

12条回答
  •  天涯浪人
    2020-12-01 09:34

    If you are getting this in a C# projet, check if you are running in 64-bit or 32-bit mode with the following code:

            if (IntPtr.Size == 4)
            {
                Console.WriteLine("This is 32-Bit!");
            }
            else if (IntPtr.Size == 8)
            {
                Console.WriteLine("This is 64 Bit!");
            }
    

    If you find that you are running in 64-Bit mode, you may want to try switching to 32-Bit (or vice versa). You can follow this guide to force your application to run as 64 or 32 bit (X64 and X86 respectively). You have to make sure that Platform Target in your project properties is not set to Any CPU and that it is explicitley set.

    Switching that option from Any CPU to X86 resolved my error and I was able to connect to the Oracle provider.

提交回复
热议问题