SQLConnection vs. OLEDbConnection
Posted on 2009-04-21
Our system will allow users to add different OLEDB connections to connect to different databases. The user choose a provider and other parameters for that OLEDB.
Do you recommend that the program check what provider the user choose and make different connections?
For example, the user add an MSDAORA (oracle) then we make an OLEDbConnection and if the user choose SQLOLEDB we make a SQLConnection or doesn't it matter? Is it bad practice to use OLEDbConnection all the time? (much easier to code...)
I guess most of you will say , use SQLConnection if it's SQL Server, but what's the benefit to make a SQLConnection instead of an OLEDBConnection with SQLOLEDB or SQLNCLI as the provider?