Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8617227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:48:20+00:00 2026-06-12T05:48:20+00:00

I need to connect to a Oracle DB (external) through Visual Studio 2010. But

  • 0

I need to connect to a Oracle DB (external) through Visual Studio 2010. But I dont want to install Oracle on my machine.
In my project I referenced: System.Data.OracleClient. But its not fulfilling the need.
I have an “Oracle SQL Developer IDE” in which I run SQL queries against oracle db.

I have this code so far:

 private static string GetConnectionString()
    {
        String connString = "host= serverName;database=myDatabase;uid=userName;pwd=passWord";
        return connString;
    }

 private static void ConnectingToOracle()
    {
        string connectionString = GetConnectionString();
        using (OracleConnection connection = new OracleConnection())
        {
            connection.ConnectionString = connectionString;
            connection.Open();
            Console.WriteLine("State: {0}", connection.State);
            Console.WriteLine("ConnectionString: {0}",
                              connection.ConnectionString);

            OracleCommand command = connection.CreateCommand();
            string sql = "SELECT * FROM myTableName";
            command.CommandText = sql;

            OracleDataReader reader = command.ExecuteReader();
            while (reader.Read())
            {
                string myField = (string)reader["MYFIELD"];
                Console.WriteLine(myField);
            }
        }
    }

So far I read these blogs:

http://st-curriculum.oracle.com/tutorial/DBXETutorial/index.htm

http://blogs.msdn.com/b/kaevans/archive/2009/07/18/connecting-to-oracle-from-visual-studio.aspx

So far I have not downloaded anything from Oracle. What steps should I take to make this happen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:48:21+00:00Added an answer on June 12, 2026 at 5:48 am

    First off you need to download and install ODP from this site
    http://www.oracle.com/technetwork/topics/dotnet/index-085163.html

    After installation add a reference of the assembly Oracle.DataAccess.dll.

    Your are good to go after this.

    using System; 
    using Oracle.DataAccess.Client; 
    
    class OraTest
    { 
        OracleConnection con; 
        void Connect() 
        { 
            con = new OracleConnection(); 
            con.ConnectionString = "User Id=<username>;Password=<password>;Data Source=<datasource>"; 
            con.Open(); 
            Console.WriteLine("Connected to Oracle" + con.ServerVersion); 
        }
    
        void Close() 
        {
            con.Close(); 
            con.Dispose(); 
        } 
    
        static void Main() 
        { 
            OraTest ot= new OraTest(); 
            ot.Connect(); 
            ot.Close(); 
        } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want connect to the Oracle database 11.2 with SSL. But the only error
I have installed Visual Studio 2010 and Oracle 11g in my Window 7. Oracle
I need to connect to SAP and do a simple update but it will
I need connect to Oracle database use jdbc driver. I look on structure URL
I need to connect to oracle from my .Net application. I'm thinking of using
I need to connect to an Oracle database server with system identifier PROD, using
im developing a app in android 2.3, i need to connect to oracle server
Here is the setup: I run Windows 7, Visual Studio 2008 and need to
I am using SQLAPI++ to connect to Oracle from my Visual C++ application. I
Here's the situation: we have an Oracle database we need to connect to to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.