Solved

Cannot import System.Data.OracleClient

Posted on 2013-01-23
4
353 Views
Last Modified: 2014-02-07
I just got a new development laptop.  Trying to work through the normal pain of reinstalling everything for Visual Studio 2005 but this is stumping me:  Getting "Doesn't contain any public member or cannot be found" for Imports System.Data.oracleclient. Intellisense doesn't even show OracleClient.

I have the Oracle Client 10g software installed and can see the System.Data.OracleClient.dll in C:\WINNT\Microsoft.NET\Framework\v2.0.50727.  I have added a Reference to the project for System.Data.OracleClient V2.0 and can see it listed in the references section. I can connect to a database in the Net Manager app of oracle and also connected and updated the database using Toad for Oracle so the Oracle install seems solid.  Please help.
Screen-of-references.docx
0
Comment
Question by:bozworthy
  • 2
4 Comments
 
LVL 1

Author Comment

by:bozworthy
ID: 38812926
I should add that this same project worked on my old laptop.  I'm attempting to open the same folder on the new machine. Also, System.Data.OracleClient is importing successfully in ASP pages.  It is a VB module in the App_code folder that is having the problem.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38812930
Did you install ODAC?
0
 
LVL 1

Author Comment

by:bozworthy
ID: 38812955
No I don't think so. I don't believe it's been required in the past. Can you address why the namespace loads in ASP pages but not the VB module in the App_Code section?
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 38816222
Visual Studio is quite old as far as systems have been evolving. I suspect that the version of the OracleClient.dll installed on your new laptop might be to high for Visual Studio 2005, while ASP is able to use it.

Also, you do not see it in that version of Visual Studio, but if you were on VS2010 or VS2012, when trying to use OracleClient you would get a warning that it is Obsolete and won't be supported in future versions. You are advised to use the ODP available on the Oracle site instead.

I suggest that you move up to Visual Studio 2012. If you are working as a full time programmer, you might prefer the Professional edition, but the Express edition is free and does almost as much as the Pro edition of VS2005 did. The newer edition would
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 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