Home > Articles > Data > SQL Server

  • Print
  • + Share This
This chapter is from the book

SqlClient Classes That You Can’t Use on the Server

Although the same provider is used on the client and server, some of the classes that contain ancillary functionality will not be available on the server. Most often, they are not available because they don’t make sense inside the database or couldn’t be hooked up to the internal context. We’ve mentioned most of the "prohibited on the server" constructs in the SqlConnection and SqlCommand sections. Another class that won’t work in the server is SqlBulkCopy, which you’ll see (from the client side) in Chapter 14.

In addition, you must use the SqlClient–specific classes inside .NET Framework procedural code. Chapter 14 discusses the fact that .NET Framework data providers are now base class–based. Using the base classes such as DbConnection, DbCommand, and so on inside the server is not supported. Finally, Chapter 14 discusses the tracing facility in ADO.NET 2.0. This built-in tracing facility is not available inside server code.

  • + Share This
  • 🔖 Save To Your Account