Click here to Skip to main content
16,016,301 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Folks


I want to connect multiple Provider (eg:sqlclient and oracle and msaccess and Msaccess)

as a dynamically , is any common for class
[
sqlclient- System.Data.SqlClient
OLE DB .--System.Data.OleDb
ODBC -Microsoft.Data.Odbc
Oracle -System.Data.OracleClient
]
we are using multiple provider for different connection.
but now i want to use only one class for all provider


regards
Kumar.
Posted

Well you could always create you own classes that would provide the common functionality and internally use different provider. However if the code using this common class should always be the same regardless of the actual provider, you must implement only functionality that is found in each provider.

Having that said, would it be easier to use Ole Db in all of the situations? This way you would get the basic provider functionality, using code is always the same. Of course you still need to vary the SQL statements since there are a lot of differences between the database products but at least the C# code would be quite same.
 
Share this answer
 
No, there is not. You could, however, write your own wrapper class. There are likely some 3rd party ones already if you search google. Some may even be free. I know people have been asking for this for a long time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900