ADO.Net and Oracle

Posted on 2004-11-15
Last Modified: 2010-04-15

  Could someone advice me on how I could open a connection to an Oracle database and excute a SQL statement using OleDb namespace. (ex: select)

Any help is greatly appreciated.
Question by:b3cf
    1 Comment
    LVL 22

    Accepted Solution


      It's the same like any database that has OleDb drivers

    Here's a sample, not tested cuz i don't have oracle installed in my current computer, but this should help you

    OleDbConnection cn = new OleDbConnection("provider=msdaora;user
    id=scott;password=tiger;data source=OraServer;");

    OleDbCommand cmd = new OleDbCommand("Select * from emp",cn);

    OleDbReader dr;

    dr = cmd.ExecuteReader;

    // place ur code


    for more info look at these articles



    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now