1

I am making my first web application (a one-page web application that shows four tables of sample data from my department in a hospital).

I am trying to make my connection string in my web.config file using this example:

      <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <connectionStrings>
        <clear /> 
        <add name="name" 
        connectionString="server=localhost;database=myDb;uid=myUser;password=myPass;" />
      </connectionStrings>
    </configuration>  

However, I do not know how to find the needed information (my Oracle database runs on a server, which is located elsewhere). I have found a good walkthrough to Visual Studio, where you can right-click on your connection in server explorer and then see your connection string in the properties section. This is not possible in Visual Studio Code, though. So how do I find this information?

In Oracle SQL Developer I can find the following information: Name, hostname, port, service name. But which of these information should I use?

What is Add name? (is it the 'service name' I can see in SQL Developer?) What is server? (is it the 'hostname' I can see in SQL Developer??) What is database? (Is it Oracle?)

2
  • well you need the server IP address, port, and database name. You need to ask your DBA Commented Nov 1, 2021 at 12:40
  • Thank you for your reply. I have the IP address and the port - where in the xml script am I supposed to write this information? Is it server='IP adress'? And where should I write the port number? Commented Nov 2, 2021 at 13:32

1 Answer 1

1

Take a look at https://www.connectionstrings.com/oracle/

Maybe this will help you. Usually if the port of the database server is not standard, it is sufficient to specify it with semicolons.

E.g. 10.100.1.200:1234

assuming 10.100.1.200 your server address and 1234 your server port.

You have to create a connection string like the one you have in your example. Just replace the needed informations (username, password, ip etc...)

Basically you should replace "localhost" in your connection string, with IP:PORT information (I think it should work)

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

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.