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!

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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.
Thank you very much. This is what I have searched for. Its working great.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.