locked
Error when using OracleDatabase RRS feed

  • Question

  • User-982557330 posted

    Hi all,

    I have SqlServer express 2008 and Oracle 11g on my machine ,so when i use sqlserver my project work properly but when i try

    to use oracle i received this message:

    Error    1    The type or namespace name 'OracleClient' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)    C:\Users\...\...\...\...\...\...

    when i want to add namespace manulally to Usings list it is not accepted like this

    using System.Data.OracleClient;

    what is proper establishing steps for a project using oracle (both 4 web and desktop application)

    Note: my version of .net 2010

    thanks

    Friday, September 28, 2012 12:42 AM

Answers

  • User1759999623 posted

    In Visual Studio, in the Solution Explorer, right-click on your project.  In the context menu, you should see a menu item for Add Reference...  Select this to get the dialog box.  The first tab should be for .NET assemblies.  Look for System.Data.OracleClient and select it.  Then click on the OK button.

    Note that Oracle provides its own database functionality, so you might look into Oracle's own data provider.

    http://www.oracle.com/technetwork/database/windows/downloads/index-101290.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 28, 2012 9:27 AM

All replies

  • User1759999623 posted

    You need to add a reference to the System.Data.OracleClient.dll assembly.  It is not referenced by default.

    Friday, September 28, 2012 1:33 AM
  • User-982557330 posted

    Thanks 4 quick reply,

    For fixing similar problems later ,I want to know how to add this reference you mentioned and where I will find this reference in .net IDE

    or is it need to download it from internet

    Note : I am a new member in C# world

    thanks

    Friday, September 28, 2012 1:59 AM
  • User1759999623 posted

    In Visual Studio, in the Solution Explorer, right-click on your project.  In the context menu, you should see a menu item for Add Reference...  Select this to get the dialog box.  The first tab should be for .NET assemblies.  Look for System.Data.OracleClient and select it.  Then click on the OK button.

    Note that Oracle provides its own database functionality, so you might look into Oracle's own data provider.

    http://www.oracle.com/technetwork/database/windows/downloads/index-101290.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 28, 2012 9:27 AM
  • User269602965 posted

    Use Oracle ODP.NET. (Oracle.DataAccess.dll)  Faster and more full featured than the deprecated no longer supported System.Data.OracleClient.

    Friday, September 28, 2012 6:24 PM