Results 1 to 4 of 4

Thread: [RESOLVED] Oracle using ODP.NET

  1. #1

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Resolved [RESOLVED] Oracle using ODP.NET

    Firstly, my understanding of Visual Studio is spotty, so please excuse me.

    I have installed the ODAC 11g Beta 11.2.0.1.1 Oracle Developer Tools for Visual Studio (found here http://www.oracle.com/technology/sof...12011beta.html) but none of the classes appear to be available in Visual Studio.

    This isn't found:
    Code:
    using Oracle.DataAccess.Client;
    I don't know. I know I need some tutorials, but they all seem to skim or skip entirely over the initials.

    Can anyone let me know what I should be doing to get started?
    IWS

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Oracle using ODP.NET

    A 'using' directive simply tells the compiler to look in the specified namespace for unqualified type names. You have to have referenced the assembly a type is declared in before you can use it in code, and you have to have referenced at least one assembly that contains a member of a namespace before you can import that namespace with a 'using' directive. Have you reference Oracle.DataAccess.dll, which I would guess is the assembly name? If not then you can't use the classes it contains. The same goes for standard Framework assemblies, e.g. if you haven't referenced System.Data.dll then you can't import the System.Data.SqlClient namespace or use any types from that namespace. I haven't used the Oracle tools at all but, presumably, if you use any VS wizards, e.g. create a Data Source, then the required references are added for you.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Re: Oracle using ODP.NET

    Project > Add Reference... > Select "Oracle.DataAccess"

    Thank you much jmcilhinney. You've opened many doors.
    IWS

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Oracle using ODP.NET

    Cool. Don't forget to mark your thread Resolved.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width