CONTEXT THE SQLCONTEXT CLASS SqlConnec tion ISqlConnec tion SqlContext

CONTEXT THE SQLCONTEXT CLASS SqlConnec tion ISqlConnec tion SqlContext SqlPipe IDbConnec tion IDbCommand SqlDataReader IDataRecord ISqlReader ISqlRecord IDataReader ISqlCommand SqlTriggerContext IDbTransaction SqlTransaction DbTransaction SqlCommand SqlPParameterCollection ISqlParameterCollection SqlParameter IDataParameter IDataParameterCollection ISqlParameter SqlException SqlError SqlErrorCollection Figure 4-1: The SqlServer Provider Object Model SqlCommand cmd = conn.CreateCommand(); cmd.CommandText = insert into yukontest values ( inproc1 ) ; cmd.ExecuteNonQuery(); Figure 4-1 shows the object model for the SqlServerprovider. Some of the classes and interfaces will be familiar to you if you have coded ADO.NET; others are part of the SPM (and therefore shared between the SqlClientand SqlServerproviders); and yet others are extensions to the SPM and available only in the SqlServerprovider. It is worth noticing that Microsoft has changed the interface hierarchy and, in the COM spirit, added new interfaces with new functionality specific for SQL Server: ISqlXXX and friends, which implement the IDataXXX and IDbXXX interfaces from the GPM. Most of the classes in the diagram are likely to be familiar to you, but there are also a couple of new classes that didn t exist in the previous versions of ADO.NET. Context The SqlContext Class The SqlContextclass is one of the new classes, one of the extensions of the SPM; it is only part of the SqlServer provider, not the SqlClient provider. When you write data access code from the mid-tier, you always

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Java Web Hosting services

Bookmark the permalink.

Comments are closed.