none
system.data.oracleclient 'Throws a no public members error RRS feed

  • Question

  • The only posts I find similar to this are 9 to 12 years old and don't apply.

    OS:Windows 7

    DotNet Framework 4.7 (according to the registery but maybe not actual dll which says 4.0.30319)

    Microsoft Visual Studio Professional 2012
    Version 11.0.61219.00 Update 5
    Microsoft .NET Framework
    Version 4.7.02053

    Installed Version: Professional

    LightSwitch for Visual Studio 2012   04938-004-0033001-02829
    Microsoft LightSwitch for Visual Studio 2012

    Office Developer Tools   04938-004-0033001-02829
    Microsoft Office Developer Tools

    Team Explorer for Visual Studio 2012   04938-004-0033001-02829
    Microsoft Team Explorer for Visual Studio 2012

    Visual Basic 2012   04938-004-0033001-02829
    Microsoft Visual Basic 2012

    Visual C# 2012   04938-004-0033001-02829
    Microsoft Visual C# 2012

    Visual C++ 2012   04938-004-0033001-02829
    Microsoft Visual C++ 2012

    Visual F# 2012   04938-004-0033001-02829
    Microsoft Visual F# 2012

    Visual Studio 2012 Code Analysis Spell Checker   04938-004-0033001-02829
    Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

    Visual Studio 2012 SharePoint Developer Tools   04938-004-0033001-02829
    Microsoft Visual Studio 2012 SharePoint Developer Tools

    ASP.NET and Web Tools   2012.3.41009
    Microsoft Web Developer Tools contains the following components:
    Support for creating and opening ASP.NET web projects
    Browser Link: A communication channel between Visual Studio and browsers
    Editor extensions for HTML, CSS, and JavaScript
    Page Inspector: Inspection tool for ASP.NET web projects
    Scaffolding: A framework for building and running code generators
    Server Explorer extensions for Windows Azure Web Sites
    Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure

    NuGet Package Manager   2.8.60318.667
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    Oracle Developer Tools for Visual Studio   12.1.0.2.0
    Oracle Developer Tools for Visual Studio Copyright (c) 2005, 2014

    PreEmptive Analytics Visualizer   1.0
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

    SQL Server Data Tools   11.1.20627.00
    Microsoft SQL Server Data Tools


    Error:
    Import System.Data.OracleClient   Throws a no public members error
    Dim sUser As String = "validUser"
    Dim sPass As String = "correctPassword"
    Dim cn As OracleConnection "type Oracleconnection is not defined"

    cn = New OracleConnection("Data Source=" & sDatabase & ";  User Id=" & sUser & ";Password=" & sPass & ";Pooling=False;")

    I would really like a clue or even better, the fix.

    Monday, September 18, 2017 7:03 PM

All replies

  • Hi twellsles,

    Thank you for posting here.

    For your question, I test the code you provide, there is no compile error for me. How do you add the reference of "system.data.oracleclient"? I add it, it works well.

    Could you provide more details for us to reproduce the error?

    If you add the "system.data.oracleclient" from NuGet, you could try to right click the project, click add>reference>choose "system.data.oracleclient".

    >>Dim cn As OracleConnection "type Oracleconnection is not defined"

    OracleConnection is obsolete. For more details, please refer to the MSDN article. 

    https://msdn.microsoft.com/en-us/library/system.data.oracleclient(v=vs.110).aspx

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, September 20, 2017 11:31 PM
    Moderator