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?
CodePudding user response:
The ODP.NET assembly needs and Oracle (Instant) Client, their versions have to match exactly!
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
CodePudding user response:
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.