Link to home
Start Free TrialLog in
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.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

ASKER

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
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...