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 860011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:45:17+00:00 2026-05-15T08:45:17+00:00

Well, the problem is as follows: I have a WPF Application built using the

  • 0

Well, the problem is as follows:

I have a WPF Application built using the C#, I have known how to connect to oracle database engine, yet I need some help in it.

first, I want to know how to add the server to the connection string …

OleDbConnection conn = new OleDbConnection("provider=MSDAORA;data source=ORCL;user id=SCOTT;password=TIGER");

is it the provider or the data source? and the server is on my pc should I write it localhost or 127.0.0.1 then the port? and how do I add the port is it server:port or should I add another parameter?

second, I have created a function that executes a query sent to it as a parameter, I want to put the query result in a DataSet yet I don`t know how to convert the result to a DataSet.

This is my function:

public DataSet SelectQuery(String p_sSql)
    {
        DataSet ds = new DataSet();
        try
        {
            OleDbCommand myOleDbCommand = conn.CreateCommand();
            myOleDbCommand.CommandText = p_sSql.ToString();
            OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader();
            myOleDbDataReader.Read();
            //here I want to add the result to the DataSet ds ...
            myOleDbDataReader.Close();
            conn.Close();
            return ds;
        }
        catch (System.Exception ex)
        {
            MessageBox.Show("Error: " + ex.ToString());
            return null;
        }
    }
  • 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-05-15T08:45:18+00:00Added an answer on May 15, 2026 at 8:45 am

    If you are not limited only to ODBC, you should try ODP.NET

    http://www.oracle.com/technology/tech/windows/odpnet/index.html

    And here is a simple tutorial

    http://www.oracle.com/technology/pub/articles/cook-vs08.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

well I have that problem, im using a lightbox srcipt and im opening an
Well, here is my problem: I have an application that uses a custom Javascript
It's a well known problem that executing make test doesn't build the tests as
well i have most probably an extremly stupid problem but could not figure it
Tomcat has got that well-known memory leak problem that causes PermGen space errors after
Well i have a web page hosted in a IIS 7.0 now the problem
I have a WPF application which so far has been client only, but now
Here is the problem. I have spring 3.0.5, using its new DATA JPA repository
Hi friends hope all r doing well. I have a problem while reading xml
Hi friends hope all r doing well. I have a problem while reading xml

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.