1 Reply Latest reply: Apr 9, 2013 8:47 AM by 185706 RSS

    Error when connecting to Oracle from Visual Studio

      Hi all.

      I am new to .net with Oracle, not new to either one, just new to the combination.

      I am trying to follow this simple example:

      which points to:

      In the screen "Add connection" after entering:
      Server Name, User name and Password, and clicking "Test Connection" I get the following error message:

      "ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA"

      I don't know what to do, I am just trying to make a quick test to see if I can connect to Oracle from .NET, but anything I try just get errors.

      Please help.
        • 1. Re: Error when connecting to Oracle from Visual Studio
          In the web.config add this

          <add name="ORAConnectionString" connectionString="Data Source=XXX.XXX.XXX.XXX:1521/SOE;User ID=XXXX;Password=XXXX;" providerName="System.Data.OracleClient"/>

          This assumes that you have the client installed -- it also allows you to connect with using the TNSNAMES