Database independent programming? (OLEDB or ODBC data Adaptor)
-
.NET has OLEDB and ODBC Data Adaptors. But the documentation does not give enough information regarding which one among these two is suited for which purpose. I need to keep my program transparent to whether the client uses Oracle or SQL Server at the backend. Can some expert will throw light on this?
-
.NET has OLEDB and ODBC Data Adaptors. But the documentation does not give enough information regarding which one among these two is suited for which purpose. I need to keep my program transparent to whether the client uses Oracle or SQL Server at the backend. Can some expert will throw light on this?
Salil Khedkar wrote: .NET has OLEDB and ODBC Data Adaptors. But the documentation does not give enough information regarding which one among these two is suited for which purpose ODBC is an older connectivity model and only exists for backwards compatibility. If all the databases you are connecting to support OLEDB then you should use that one. Salil Khedkar wrote: I need to keep my program transparent to whether the client uses Oracle or SQL Server at the backend The SQL supported by SQL Server and Oracle have some differences also - if the user is writing SQL in your app I don't see how you can keep things completely transparent. So, one way or another you will be writing slightly different SQL. IMHO, if the user is kept totally away from the database (no direct interaction) then my suggestion is to go for the specific SQL Server or Oracle data providers in the .NET Framework as you'll have to swap out the actual SQL commands anyway you might as well just optimise the whole by using the providers specific to the database.
Do you want to know more? Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
-
Salil Khedkar wrote: .NET has OLEDB and ODBC Data Adaptors. But the documentation does not give enough information regarding which one among these two is suited for which purpose ODBC is an older connectivity model and only exists for backwards compatibility. If all the databases you are connecting to support OLEDB then you should use that one. Salil Khedkar wrote: I need to keep my program transparent to whether the client uses Oracle or SQL Server at the backend The SQL supported by SQL Server and Oracle have some differences also - if the user is writing SQL in your app I don't see how you can keep things completely transparent. So, one way or another you will be writing slightly different SQL. IMHO, if the user is kept totally away from the database (no direct interaction) then my suggestion is to go for the specific SQL Server or Oracle data providers in the .NET Framework as you'll have to swap out the actual SQL commands anyway you might as well just optimise the whole by using the providers specific to the database.
Do you want to know more? Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
Thanks Colin, these pointers will be helpful… :rose: