.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Articles >> .Net Framework >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Namespace Organization

Posted By:Shashi Ray       Posted Date: November 24, 2009    Points: 15    Category: .Net Framework    URL: http://www.dotnetspark.com  

The types (classes, structs, enums, and so on) associated with each .NET data provider are located in their own namespaces:

  • System.Data.SqlClient. Contains the SQL Server .NET Data Provider types.
  • System.Data.OracleClient. Contains the Oracle .NET Data Provider
  • System.Data.OleDb. Contains the OLE DB .NET Data Provider types.
  • System.Data.Odbc. Contains the ODBC .NET Data Provider types.
  • System.Data. Contains provider-independent types such as the DataSet and DataTable.

Within its associated namespace, each provider provides an implementation of the Connection, Command, DataReader, and DataAdapter objects. The SqlClient implementations are prefixed with "Sql" and the OleDb implementations are prefixed with "OleDb." For example, the SqlClient implementation of the Connection object is SqlConnection, and the OleDb equivalent is OleDbConnection. Similarly, the two incarnations of the DataAdapter object are SqlDataAdapter and OleDbDataAdapter, respectively.

In this guide, the examples are drawn from the SQL Server object model. Although not illustrated here, similar features are available in Oracle/OLEDB and ODBC.



Shashi Ray

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend