Home » Infrastructure » Windows » Start using ODP.net (Oracle 11.0.2.10 Window 10 Pro Visual Studio 2010 IIS 6)
Start using ODP.net [message #666072] Thu, 12 October 2017 01:16 Go to next message
OraFerro
Messages: 315
Registered: July 2011
Senior Member
Hi All,

My team shifted to full Oracle DB instead of a split between SharePoint and Oracle.
I need support as I am trying to start using ODP.net to utilize its bulk insert capabilities.

I used to have Oracle instant client 12 in order to access the database though sqlplus and dbForge (another tool). I have tnsnames.ora placed in Oracle directory on my local machine and the Path environment variable points to it.

I guess the problem is that I tried to install ODAC122010Xcopy_x64 and I guess there is a confusion that takes place. Although sqlplus and dbForge work fine, the application does not work.

In my .net application I am trying to make a simple connection, just to run a query.

Attached is a snapshot from the simple app with the reported error: "There was a mismatch between the processor architecture of the project being built and the processor architecture of the reference "Oracle.DataAccess"

I tried everything I could find on the internet:
- copying Dll directly to my project bin folder
- adjust IIS to allow Enable 32-bit apps
- adjust build target architecture 32-bit to True
- make specific version False for Oracle.DataAccess project reference

Still same error and I am running out of clues.

Regards,
Ferro
  • Attachment: AppCode.jpg
    (Size: 361.97KB, Downloaded 28 times)
Re: Start using ODP.net [message #666094 is a reply to message #666072] Fri, 13 October 2017 06:58 Go to previous messageGo to next message
Flyby
Messages: 181
Registered: March 2011
Location: Belgium
Senior Member
Did you install ODAC122010Xcopy_...? (the 32-bit version, probably ending with x86)
Re: Start using ODP.net [message #666102 is a reply to message #666094] Sun, 15 October 2017 02:09 Go to previous message
OraFerro
Messages: 315
Registered: July 2011
Senior Member
@Flyby, the one I installed ends with _x64 not x86
a snapshot attached.

In my application, an exception: "Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Source=Oracle.DataAccess" is fired as soon as the statement:
con = new OracleConnection();
is executed.

Thanks
Ferro
  • Attachment: Capture.PNG
    (Size: 13.77KB, Downloaded 24 times)

[Updated on: Sun, 15 October 2017 02:09]

Report message to a moderator

Previous Topic: Start database on Windows (split from hijacked topic)
Next Topic: ODP.net passing grid data to SP UDT parameter - C#
Goto Forum:
  


Current Time: Sun Dec 17 11:32:05 CST 2017

Total time taken to generate the page: 0.01275 seconds