Connect to Oracle database in C# ASP

Please help me in connecting to Oracle via a VPN connection.
My database is located on my school's server.  I can connect to it using the following parameters:
    * Name:
    * Port: 1521
    * Oracle SID: ite10g

 As long as I'm on the school network I can connect.  But I am not sure how to add these parameters for my ASP page.  Thank you,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
What data provider are you wanting to use?  I suggest ODP.Net which is Oracle's .Net data provider but some people like OLEDB and use either Oracle's or Microsofts.

Once you have the dataprovider installed you'll just need the proper references.

There's a decent page that has just about ever type of connection string available:
adajani1Author Commented:
MY *.asp page will be on the school's network.

I was only provided with the above parameters.   Not sure what driver they installed.
adajani1Author Commented:
I did an application with java b4 using the following parameters and it worked.. I just don't know how to include this info for my ASP.

String driverName = "oracle.jdbc.driver.OracleDriver";

       System.out.println("Connecting   to Oracle...");  

       String url = "";
       Connection conn = DriverManager.getConnection(url,"name","password");

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

slightwv (䄆 Netminder) Commented:
It's very similar in .Net to the Java connection you posted.

I would guess the Microsoft OLEDB for Oracle driver.

Take a look at:

If you're still unsure, here's a simple .Net page using VB.Net and ODP.Net.  Hopefully it will give you a starting place.
<%@ import namespace = "System.Data" %>
<%@ import namespace = "System.XML" %>
<%@ import namespace = "Oracle.DataAccess.Client" %>
<%@ import namespace = "Oracle.DataAccess.Types" %>

<title>simple DB test</title>

<script language="VB" runat="server">

sub page_load(sender as object,e as eventargs)

      Dim con As New OracleConnection("User Id=<user>;Password=<pass>;Data Source=<DBAlias>;")

      Dim cmd as OracleCommand = new OracleCommand()
      cmd.Connection      = con
      cmd.CommandType      = CommandType.Text
      cmd.commandText      = " select  sysdate from dual "


            response.write("<br/>Got: " &  cmd.executeScalar())

      catch ex as exception
            response.write("Error: " & ex.message)

      end try
end sub



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This is a common problem on VPN connections

Try to  ping your server with FQDN (ping 99.99% the ping will fail
then if it fails, learn the ip address of the oracle server from ur admin and replace
 with the ip address.

Your problem is solved-- Very simple
slightwv (䄆 Netminder) Commented:
I suggest a split between ramumorla and myself.
i agree
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.