Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Latest Oracle Connection method

Latest Oracle Connection method

Scheduled Pinned Locked Moved Database
csharpdatabasevisual-studiohtmloracle
4 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mycroft Holmes
    wrote on last edited by
    #1

    I just got a requirement for a web API to an Oracle database. So I fire up an Oracle DAL from 2010 only to find the reference to System.Data.OracleClient are out of date and it is not recommended. Searching for Oracle Connection does not uncover the references required, connection strings.com was no real help. Can someone advise me on the current references for VS 2015 to connect to Oracle please. I can't add object to the server as one article suggested just a plain read only connection is required. [edit0] Looks like this is the latest tool from Oracle Oracle Data Provider for .NET (ODP.NET)[^]. What a PITA, First I need an account to download, create an account, nope email already has an account, do the forgot password thing. Ok have account not to refind the link to download. It has to be run as admin if you want to install for all users, you are not given a choice to install for just yourself. Have to close all VS Instances. I'm betting the 2017 version does not work with 2015 and it seems like you can only have 1 version installed. :sigh: As I sit here waiting for help desk to allow me to install a .net driver I really do not like Oracle. [/edit0] [edit1] They have a nuget package - I hate nuget [/edit1]

    Never underestimate the power of human stupidity RAH

    J 1 Reply Last reply
    0
    • M Mycroft Holmes

      I just got a requirement for a web API to an Oracle database. So I fire up an Oracle DAL from 2010 only to find the reference to System.Data.OracleClient are out of date and it is not recommended. Searching for Oracle Connection does not uncover the references required, connection strings.com was no real help. Can someone advise me on the current references for VS 2015 to connect to Oracle please. I can't add object to the server as one article suggested just a plain read only connection is required. [edit0] Looks like this is the latest tool from Oracle Oracle Data Provider for .NET (ODP.NET)[^]. What a PITA, First I need an account to download, create an account, nope email already has an account, do the forgot password thing. Ok have account not to refind the link to download. It has to be run as admin if you want to install for all users, you are not given a choice to install for just yourself. Have to close all VS Instances. I'm betting the 2017 version does not work with 2015 and it seems like you can only have 1 version installed. :sigh: As I sit here waiting for help desk to allow me to install a .net driver I really do not like Oracle. [/edit0] [edit1] They have a nuget package - I hate nuget [/edit1]

      Never underestimate the power of human stupidity RAH

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #2

      Caveat, I haven't worked with Oracle since 2016. In my experience, System.Data.OracleClient should actually work just fine, it was even getting updated with new functionality for VS2015. BUT, it might break if your Oracle DB gets updated. Otherwise I strongly recommend to get the managed version of the driver. It doesn't need installation and it's not sensitive to 32 or 64 bit versions, just paste the dll into the bin folder and add a few lines into the app.config. Example below. You obviously need to correct for your version of the client.

      configSections NEEDS to be FIRST in the configfile.

      Wrong is evil and must be defeated. - Jeff Ello

      M 1 Reply Last reply
      0
      • J Jorgen Andersson

        Caveat, I haven't worked with Oracle since 2016. In my experience, System.Data.OracleClient should actually work just fine, it was even getting updated with new functionality for VS2015. BUT, it might break if your Oracle DB gets updated. Otherwise I strongly recommend to get the managed version of the driver. It doesn't need installation and it's not sensitive to 32 or 64 bit versions, just paste the dll into the bin folder and add a few lines into the app.config. Example below. You obviously need to correct for your version of the client.

        configSections NEEDS to be FIRST in the configfile.

        Wrong is evil and must be defeated. - Jeff Ello

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        Jörgen Andersson wrote:

        System.Data.OracleClient

        Has been deprecated in favour of Oracles ODP, I chased down a connection string that does not need tsnames.ora that works a treat.

        Never underestimate the power of human stupidity RAH

        J 1 Reply Last reply
        0
        • M Mycroft Holmes

          Jörgen Andersson wrote:

          System.Data.OracleClient

          Has been deprecated in favour of Oracles ODP, I chased down a connection string that does not need tsnames.ora that works a treat.

          Never underestimate the power of human stupidity RAH

          J Offline
          J Offline
          Jorgen Andersson
          wrote on last edited by
          #4

          Mycroft Holmes wrote:

          Has been deprecated in favour of Oracles ODP

          For having been deprecated for so many years (2009), it's getting an awful lot of updates. :)

          Mycroft Holmes wrote:

          I chased down a connection string that does not need tsnames.ora that works a treat.

          The content of the tnsnames.ora can be put in so many different places... Happy it works for you. Configuration of Oracle is admittedly a PITA. Me, I'm swearing over the locks in SQL Server and wishing myself back to the stability and performance of Oracle. :)

          Wrong is evil and must be defeated. - Jeff Ello

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups