0

I just want to connect to an oracle database without an installation. On java I can use a simple jdbc library. But what is the easiest way in .net C# to connect to an oracle database? I also need an interface to switch the drivers like on jdbc for other SQL databases.

Thanks for help!

aemik
  • 35
  • 4

1 Answers1

3

I think what you want is the Oracle Managed Driver: https://www.nuget.org/packages/Oracle.ManagedDataAccess/

I'm not sure what you meant by

I also need an interface to switch the drivers like on jdbc for other SQL databases.

This is a managed ADO.NET driver, so if you want to use a different database (e.g. MySQL) then you just stop using this driver and use the other one.

CodingGorilla
  • 19,612
  • 4
  • 45
  • 65
  • Good answer! About `switch`: I think the author means that he wants to write cross database code, so he has to use high abstractions of ADO.NET, IDbConnection instead of OracleConnection, IDbCommand instead of OracleCommand and so on. – Ilia Maskov Jan 15 '16 at 15:36
  • Thank you very much. This is what I have searched for. Its working great. – aemik Jan 19 '16 at 07:15