Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 06, 2012 02:18 PM by Inayat Rasool
Mar 06, 2012 02:03 PM|LINK
Recently our project is migrating from legacy DB to SQl Server and we need to move our database layer. Currently we are using OledbConnection for Database. Now since we are migrating to SQL Server, is it good to migrate whole Database to use SqlConnection
or keeping OledbConnection is a better option? Is there any performance advantage with SqlConnection?
Mar 06, 2012 02:18 PM|LINK
If it doesnt take a whole lot, its better to switch to SQLconnection.
Microsoft has lot of built-in features to use while using SQL connection. I am not sure if you can use LINQ to SQL with OLEDB connection.
SqlClient namespace classes implement a TDSParser which means they deal directly with the stream coming back from SQL; whereas OLEDB stuff runs through a more generic filter. SQL connection processes data lot faster than OLEDB if you are using SQL server.
One more thing, If your company bychance have plans to switch to any other database other than SQL(ORACLE) in future then probably you would want to keep up with OLEDB.