Avatar of skyzipper
skyzipperFlag for Afghanistan

asked on 

What Oracle dataprovider should i use in visual studio 2010?

Hello Experts,
I recently switched from visual 2008 - visual 2010.  In 2008, i used the System.Data.Oracleclient namespace.  When I try to use the same dll in 2010 I can't get any of the controls to show up in the tool box.  Is there any easy way to use the System.Data.Oracleclient in 2010, or should i be using a new dataprovider? We are using a Oracle 11i database if that matters.
Oracle DatabaseVisual Basic.NET.NET Programming

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of kaufmed
Flag of United States of America image

Make sure you take not of which version you install as well. If you get the 32-bit provider, then you will have to mark your .NET assembly as x86; likewise, if you get the 64-bit version, then you will need to mark the assembly as x64. If you don't do this, then you will run into BadImageFormatExceptions.
If switching to a new provider is a lot of work and you need this quickly you could downgrade your project as the OracleClient is not compatible with .NET frameWork 4.0 but is still available in VS2010 when you use an earlier framework.

EDIT: actually it seems only to be a problem with 4.0 Client profile
I have just created a test project using the OracleClient and it works but you get this warning:

warning BC40000: 'System.Data.OracleClient.OracleConnection' is obsolete: 'OracleConnection has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

IMHO, porting to ODP.Net isn't a huge deal.  Most of the calls are the same you just need to change the class names.

This will keep you on a supported architecture.
Avatar of skyzipper
Flag of Afghanistan image


Thanks, I will try it out.  I did get the old System.Data.Oracleclient working, but I couldnt drag any of the controls onto the form.  Everything was done with code, but I need to create some typed datasets for a datagrid dropdown list.  I will give it a shot and let you know
Avatar of kaufmed
Flag of United States of America image

you just need to change the class names.
In my experience, the class names are the same; only the namespace differs. Now some of the special Oracle things are different/new (e.g. user-defined types), but the basics should be the same.
>>In my experience

Could be.  I only know enough .Net to be dangerous and have used ODP.Net since it came out so my porting knowledge is very old...
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo