problem to connect to Oracle from my C# WinForm program
i try to connect to Oracle 11.2.0 64bit from my C# program
and i get this error:
Attempt to load Oracle client libraries threw BadImagFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
my code for connect to Oracle
Conect = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + IP + ")(PORT=" + PORT +开发者_JS百科 ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" + Server + ")));User Id=" + UID + ";Password=" + PASS + ";";
Conn = new OracleConnection(Conect);
Conn.Open();
and my program compile on X86 (for working on 64 bit)
what i need to download or change in my C# program ?
thanks in advance
If you are using oracle 32bit client you need to rebuild your app from Any CPU to x86.
精彩评论