Udostępnij za pośrednictwem


SQL Native Client Programming

SQL Native Client is a data access technology that is new to Microsoft SQL Server 2005, and it is a stand-alone data access application programming interface (API) that is used for both OLE DB and ODBC. It combines the SQL OLE DB provider and the SQL ODBC driver into one native dynamic-link library (DLL) while also providing new functionality above and beyond that supplied by the Microsoft Data Access Components (MDAC). SQL Native Client can be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2005 features such as multiple active result sets (MARS), user-defined data types (UDT), query notifications, snapshot isolation, and XML data type support.

Note

For a list of the differences between SQL Native Client and MDAC, plus information about issues to consider before updating an MDAC application to SQL Native Client, see Updating an Application to SQL Native Client from MDAC.

The SQL Native Client ODBC driver is always used in conjunction with the ODBC Driver Manager supplied with MDAC. The SQL Native Client OLE DB provider may be used in conjunction with OLE DB Core Services supplied with MDAC, but this is not a requirement – the choice to use Core Services or not depends on the requirements of the individual application (for example, if connection pooling is required).

ActiveX Data Object (ADO) applications may use the SQL Native Client OLE DB provider, but it is recommended to use it in conjunction with the DataTypeCompatibility connection string keyword (or its corresponding DataSource property). When using the SQL Native Client OLE DB provider, ADO applications may exploit those new features of SQL Server 2005 that are available via the SQL Native Client via connection string keywords or OLE DB properties or Transact-SQL. For more information about the use of these features with ADO, see Using ADO with SQL Native Client.

SQL Native Client was designed to provide a simplified method of gaining native data access to SQL Server using either OLE DB or ODBC. It is simplified in that it combines OLE DB and ODBC technologies into one library, and it provides a way to innovate and evolve new data access features without changing the current MDAC components, which are now part of the Microsoft Windows platform.

While SQL Native Client uses components in MDAC, it is not explicitly dependant on a particular version of MDAC. You can use SQL Native Client with the version of MDAC that is installed with the operating systems supported by SQL Native Client.

In This Section

When to Use SQL Native Client

Discusses how SQL Native Client fits in with Microsoft's data access technologies, how it compares to MDAC and ADO.NET, and provides pointers for deciding which data access technology to use.

Features of SQL Native Client

Describes all of the new SQL Server 2005 features that SQL Native Client supports.

Building Applications with SQL Native Client

Provides an overview of the different aspects of SQL Native Client development including how it differs from MDAC, the components that it uses, and how ADO can be used with it.

Deploying Applications with SQL Native Client

Discusses SQL Native Client installation and deployment, including how to redistribute the SQL Native Client library.

System Requirements for SQL Native Client

Discusses the system resources needed to use SQL Native Client.

SQL Native Client (OLE DB)

Provides information about using the SQL Native Client OLE DB provider.

SQL Native Client (ODBC)

Provides information about using the SQL Native Client ODBC driver.

Finding Additional SQL Native Client Information

Provides additional resources about SQL Native Client including links to external resources and getting further assistance.

See Also

Other Resources

SQL Server Programming Overview

Help and Information

Getting SQL Server 2005 Assistance