Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, July 21, 2017 6:07 PM
Microsoft has depreciated the System.Data.OracleClient namespace. I believe they replaced it with Oracle.DataAccess.DLL.
My question is where do I get the DLL and how to install it onto my PC?
Seems like too much time is being used up trying to get your developer tools back to where they can function.
MRM256
All replies (6)
Monday, July 24, 2017 7:23 AM
Hi MRM256,
Welcome to the MSDN forum.
>> My question is where do I get the DLL and how to install it onto my PC?
Do you means the System.Data.OracleClien Namespace or the Oracle.DataAccess DLL?
For the System.Data.OracleClient namespace, I tried to create a new VB Console App, right click the References > Add Reference… and search with the keyword, got the following screenshot and we can found this DLL under each installed .NET Framework versions.
For the Oracle.DataAccess, you need to install Oracle Data Access Components (ODAC) like this similar issue:How to Install “Oracle Data Access Components (ODAC)” on Windows Server 2003 R2? or have a look at this: Oracle Data Access Components Documentation 12c Release 3 (12.1.0.2.1)
Best regards,
Sara
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 [email protected]
Monday, July 24, 2017 1:58 PM
Hi Sara:
I am using Visual Studio Professional 2013 and I don't know if I can make the issue any clearer.
The sample application I am using is referencing the System.Data.OracleClient namespace. The application shows the following warnings:
Warning 1: 'System.Data.OracleClient.OracleConnectionStringBuilder'is obsolete: OracleConnectionStringBuilder has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'. C:\Users\Mark\Documents\Active Query Builder 3 .NET Examples\WinForms\GeneralDemo_VisualBasic\ConnectionForms\OracleConnectionForm.vb.
Warning 2: 'System.Data.OracleClient.OracleConnection' is obsolete: 'OracleConnection has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'. C:\Users\Mark\Documents\Active Query Builder 3 .NET Examples\WinForms\GeneralDemo_VisualBasic\ConnectionForms\OracleConnectionForm.vb 52
Warning 3: 'System.Data.OracleClient.OracleConnection' is obsolete: 'OracleConnection has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'. C:\Users\Mark\Documents\Active Query Builder 3 .NET Examples\WinForms\GeneralDemo_VisualBasic\Form1.vb
Warning 4: 'System.Data.OracleClient.OracleCommand' is obsolete: 'OracleCommand has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'. C:\Users\Mark\Documents\Active Query Builder 3 .NET Examples\WinForms\GeneralDemo_VisualBasic\Form1.vb
Warning 5: 'System.Data.OracleClient.OracleCommand' is obsolete: 'OracleCommand has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'. C:\Users\Mark\Documents\Active Query Builder 3 .NET Examples\WinForms\GeneralDemo_VisualBasic\Form1.vb
Warning 6: 'System.Data.OracleClient.OracleDataAdapter' is obsolete: 'OracleDataAdapter has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'. C:\Users\Mark\Documents\Active Query Builder 3 .NET Examples\WinForms\GeneralDemo_VisualBasic\Form1.vb
This tells me the System.Data.OracleClient namespace no longer functions. As I understand it, the Namespaces are dynamically linked libraries.
So again: What namespace replaces the System.Data.OracleClient one? In other words: How can I access an Oracle database if the namespace does not work?
Thank you,
MRM256
Monday, July 24, 2017 3:33 PM
Hi,
A namespace is not a dll. There are two concepts:
1) Project references: these are the DLLs that your project uses.
2) In turn, each DLL provides types. Types have composed names and are grouped in namespaces.
The warnings tell you that the types are obsolete. So you have two options:
1) Keep using the System.Data.OracleClient provider (provided by Microsoft), with its types. Being obsolete doesn't mean that it doesn't work, it means that you are encouraged to stop using it because they may not exist in a next .NET Framework version and you should look for a replacement. But they work. Notice that even the project builds, despite the warnings (unless you have configured the project to treat warnings are errors). If the "obsolete" warnings bother you, you can suppress them in project properties, Build tab, Suppress Warnings field and enter CS0618
2) Switch to the Oracle Data Provider (provided by Oracle) through the Oracle Data Access Components (ODAC) or ODP.NET, which implies installing the setup, changing the reference, changing namespaces, solving errors and testing. See:
Microsoft OracleClient to ODP.NET Application Migration: Introduction
http://www.oracle.com/technetwork/topics/dotnet/msoc-migration-337643.html
Needless to say, if you can use option 1 until you have understood the implications of option 2.
My portal and blog about VSX: http://www.visualstudioextensibility.com; Twitter: https://twitter.com/VSExtensibility; MZ-Tools productivity extension for Visual Studio: https://www.mztools.com
Thursday, July 27, 2017 8:01 AM
Hi MRM256,
Sorry to trouble you and does your issue is solved or not? Please have a look at the Carlos's reply and it looks reasonable.
If not, please update your latest information and we will help you research it again, thank you for your cooperation.
Best regards,
Sara
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 [email protected]
Thursday, July 27, 2017 3:06 PM
Hi Sara:
No, it does not solve the overall issue.
From my point of view. All "managed" code has managed to do was throw wrenches into applications that ran fine, but when the new framework or Visual Studio version comes out the previously working application will not compile.
For example: I made an application in VS2008 that required the use of the Microsoft.SqlServer.Management.Smo namespace. Which was housed at: C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Smo\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Smo.dll. When I tried to recompile the project in VS2013 I got the namespace message. After circling Hulahan's barn about three time I finally got the application to recompile under VS2013.
My overall point is: The developer should not have to change registry values. Then download the necessary files. Go back to his project and tweak the references just to get his application to run under the new framework or new Visual Studio version. This is particularly disastrous inside a large company that has written slews of database dependant applications that will no longer function if they decide to buy new Microsoft OS based computers .
Really, how difficult is it to make a single executable program to install the new version of a depreciated namespace? All the developer has to do is select the needed update and it is automatically installed without further fuss.
Thank you,
MRM256
Friday, July 28, 2017 9:57 AM
Hi MRM256,
Thank you for your update and sorry for this inconvenience.
Did you directly upgrade your applications which created in VS 2008 to VS 2013? Since there have lots of changes and improvements from VS 2008 to VS 2013, usually we recommend upgrade to VS 2010, then VS 2013 and it can help other to avoid the unnecessary incompatibility issues.
For your original question, please check the migration document that Carlos shared, it descirbes the following information:
**
Due to Microsoft OracleClient deprecation, Oracle developers want to migrate their current Microsoft OracleClient applications to Oracle Data Provider for .NET (ODP.NET). For most applications, migration will be easy and straightforward. Both providers share similarities in their object names, properties, methods, even their parameter markers and binding order. These web pages walk developers step by step through the code changes necessary to migrate Microsoft OracleClient code to ODP.NET code. |
|
|
Step 1: ODP.NET Installation |
Step 2: Code migration for ADO.NET Factory Classes or for Microsoft OracleClient Code |
|
Step 3: ODP.NET Deployment |
Best regards,
Sara
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 [email protected]