Generic data providers VS Specific data providers?
Reply
![]() |
|
|
From:
Anand Kumar
|
Hi Group,
Here is my thought on this...
ADO.NET is designed wrapper a set of generic interface that abstract the internal data processing functionality. The main advantages of generic data providers is you can abstract the data access layer so that you can minimize the impact of changes of data source I mean the same code will work with different database server.The core interfaces are IDbConnection,IDBCommand,IDataReader and lot many. The specific data objects like SqlCommand or OleDbConnection implement these generic data access interface. One should keep in mind while programming with generic interfaces such as
There is some small cost associated with a virtual call through an interface.
Certain expanded functionality is lost when you use the generic interfaces. For example, the ExecuteXmlReader method is implemented by the SqlCommand object but not by the IDbCommand interface.
There is no generic base exception type, so you must catch provider-specific exception types, such as SqlException, OleDbException or OdbcException.
When you use the generic interfaces, you cannot take advantage of database-specific types that are defined for the managed providers; for example, you cannot take advantage of SqlDbType in SqlClient and Oracle-specific types in the Oracle provider. Using specific database types is helpful for type checking and parameter binding.
More Information
http://support.microsoft.com/default.aspx?scid=kb;en-us;313304.
Cheers Anand http://anandkumar.blogspot.com
|
|
View other groups in this category.
![]() |
To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.
Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.
If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.
|
|