What are the Differences between OleDb and SqlClient ?
Interview question and answer by: Ddd
| Posted on: 1/20/2011 | Category: ADO.NET Interview questions
| Views: 2542 | | Points: 40
OleDb and SqlClient are both called as Data Providers in .net
They are basically namespaces which contain specific classes used for connectivity and for
OleDb is referred to as System.Data.OleDb
SqlClient is referred to as System.Data.SqlClient
OleDb: Object linking and Embedding database.
OleDb is used for connecting to any database like SQL Server, Access, Oracle, Excel.
We have to mention the appropriate provider to connect with the particular database.
This adds an extra layer for connetion and has performance impacts.
SqlClient is used for SQL Server only. (for SQL Server 7.0 onwards)
We do not have to mention the SQL Server provider.
For SQL Server 6.5 or lower we will have to use OleDb
SqlClient is faster than OleDb.
| Alert Moderator
Found interesting? Add this to: