Oracle.DataAccess Error

前端 未结 5 1360
失恋的感觉
失恋的感觉 2021-01-03 06:13

I have an asp.net / C# web application running in a Windows environment. The project builds fine and runs perfectly on my local machine\'s VB.net development server.

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 06:38

    First off: The Oracle client/provider is a mess. And that goes for both the MS one (depreciated anyway) as well as the Oracle one.

    In order to connect to an Oracle DB via the ODP.NET provider three things need to be setup properly:

    • Oracle client needs to be setup properly ( has nothing to do with the .NET provider, this referring to the installed oracle client usually in c:\oracle)
    • The ODP.NET provider needs to be compatible with the installed Oracle client
    • The architecture of client and provider and your application need to match, you cannot use the 64bit client with an x86 provider/application and vise versa

    Usually the best is to have the newest version of both. But if you want to get rid of this issue once and for all use a third party oracle .NET provider.

    UPDATE

    One of the better ones is from DataDirect (no affiliation):
    http://www.datadirect.com/products/net/net-for-oracle/index.html

    It's not just installation (no oracle client necessary), but it's also faster, fully managed, x64 and general support is a way better than what you get with the ODP.NET one. It will cost you though.

    The DevArt one is pretty decent as well (and much much cheaper):
    http://www.devart.com/dotconnect/oracle/

    We decided for the DataDirect for extensibility reasons, this should not be relevant to you however.

    Here you can find a good compilation of third parties that build .NET providers, not limited to oracle though:
    http://msdn.microsoft.com/en-us/data/dd363565

提交回复
热议问题