ADO.NET Is a part of .net framework which provides various objects to communicate with databases.which provides various providers to communicate with various databases.these all we can say as specific providers
Generally
I want to communicate with sql server-2005/2008---- System.Data.SqlClient;
I want to communicate with Oracel 9i,10g,11i-------> System.Data.OracleClient;[Add Reference]
I want to communicate with any RDBMS,MySql------------>System.Data.oledb;
I want to communicate with any non-RDBMS-----> System.Data.Odbc;
Ex : my database is SqlServer then i will import
usings System.Data.SqlClient ;
the relavent classes to Sql server are available in this namespace.
like
SqlConnection;
SqlDataAdapter
SqlCommand
SqlDBType.......are all belongs to sqlserver 2005/2008 specific classes for sql server..
otherwise i want communicate with Oracle database then
using System.Data.OracleClient;
the relavent classes to Oracle are available in this namespace.
like
OracleConnection
OracleCommand
OracleDataAdapter
......ect related to Oracle are available in this namespace.there are specific classes for oracle.
System.Data.Oledb is for any RDBMS so we can use these classes to communicate with Sqlserver and Oracle also but we have specific classes to those databases so using apporiate specific providers is good**
.....these all specific provider classes to communicate with their apporiate databases.as well as ADO.NET provides common consumer objects these objects can be used by any provider means our database may be sqlserver,or oracle,mysql..ect.
using System.Data;
in this name space we have so many good common consumer objects we have
Ex:
Dataset;
DataTable
DataView
DataRow
......ect available in System.Data namespace.
Conculsion: As per our above points according to database we have to choose a specific provider it may be oracle(system.data.oracleclient),sql server(system.data.sqlclient),mysql(system.data.oledb)...ect these namespace if we import provider which gives relavent classes for that database.
Common Comsuer objects for all which can be any database provider we can utilize these classes to storing,filtering,....ect these are available in System.Data.
Generally
I want to communicate with sql server-2005/2008---- System.Data.SqlClient;
I want to communicate with Oracel 9i,10g,11i-------> System.Data.OracleClient;[Add Reference]
I want to communicate with any RDBMS,MySql------------>System.Data.oledb;
I want to communicate with any non-RDBMS-----> System.Data.Odbc;
Ex : my database is SqlServer then i will import
usings System.Data.SqlClient ;
the relavent classes to Sql server are available in this namespace.
like
SqlConnection;
SqlDataAdapter
SqlCommand
SqlDBType.......are all belongs to sqlserver 2005/2008 specific classes for sql server..
otherwise i want communicate with Oracle database then
using System.Data.OracleClient;
the relavent classes to Oracle are available in this namespace.
like
OracleConnection
OracleCommand
OracleDataAdapter
......ect related to Oracle are available in this namespace.there are specific classes for oracle.
System.Data.Oledb is for any RDBMS so we can use these classes to communicate with Sqlserver and Oracle also but we have specific classes to those databases so using apporiate specific providers is good**
.....these all specific provider classes to communicate with their apporiate databases.as well as ADO.NET provides common consumer objects these objects can be used by any provider means our database may be sqlserver,or oracle,mysql..ect.
using System.Data;
in this name space we have so many good common consumer objects we have
Ex:
Dataset;
DataTable
DataView
DataRow
......ect available in System.Data namespace.
Conculsion: As per our above points according to database we have to choose a specific provider it may be oracle(system.data.oracleclient),sql server(system.data.sqlclient),mysql(system.data.oledb)...ect these namespace if we import provider which gives relavent classes for that database.
Common Comsuer objects for all which can be any database provider we can utilize these classes to storing,filtering,....ect these are available in System.Data.
No comments:
Post a Comment