.NET 5 reference from a .NET Framework Oracle 9i Data Access

934 views Asked by At

I am developing a small web application that needs to reference an existing .NET Framework(4.6) class library. This library is from an old project which connects to an Oracle 9i database for the data access.

Since Oracle 9i is not supported by ODP.NET, is it possible to reference the .net framework class library in the .net 5 project?

2

There are 2 answers

0
onhax On BEST ANSWER

What I ended up doing is using the System.Data.OracleClient namespace and ported all the needed data access related methods from the old .net framework library to the .net5 project. I had to set the platform target to x86, since Any CPU will not work due to compatibility reasons.

Also adding a reminder that Oracle 9i(not sure with newer versions) returns integers as decimals (1 to 1.0) throwing an error when converting OracleDataReader to typed classes.

4
Wernfried Domscheit On

The ODP.NET assembly needs and Oracle (Instant) Client, their versions have to match exactly!

According Client / Server Interoperability Support Matrix for Different Oracle Versions you need Oracle Client version 11.2 or older - if "Oracle 9i" means version 9.2.0.

enter image description here

You can still download ODAC version 11.2 from 32-bit Oracle Data Access Components (ODAC) and 64-bit Oracle Data Access Components (ODAC)

But I guess, you need to compile at .NET Framework version 4.x