Microsoft KB Archive/901039

= Description of the type mapping of the new SQL Server 2005 data types in Microsoft Data Access Components =

Article ID: 901039

Article Last Modified on 3/13/2006

-

APPLIES TO


 * Microsoft Data Access Components 2.8
 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Express Edition
 * Microsoft SQL Server 2005 Standard Edition

-





INTRODUCTION
This article describes the type mapping of the new Microsoft SQL Server 2005 data types in Microsoft Data Access Components (MDAC).



MORE INFORMATION
When you use Microsoft SQL Server ODBC Driver (SQLODBC) to connect to a SQL Server 2005 database, MDAC maps the new SQL Server 2005 data types to the following types of metadata.

Note This data type mapping does not occur when you use Microsoft SQL Native Client to connect to a SQL Server 2005 database.

For example, if you query a column of the XML data type from an MDAC application, you receive the ntext data type. Additionally, when you try to use the like operator together with a column of the XML data type, you receive an error message that is similar to the following:

Argument data type xml is invalid for argument 1 of like function.

This behavior is by design. This data type mapping makes an MDAC application continue to work when the application has to use a column of data that contains one of the new SQL Server 2005 data types.

Notice that there are some differences between the SQL Server 2005 data types and the data types to which MDAC maps. The varchar(max) data type, the nvarchar(max) data type, and varbinary(max) data type have fewer restrictions than the text data type, the ntext data type, and the image data type.

When you use the new SQL Server 2005 data types, a general application has more flexibility in the statement that is in the Transact-SQL script. However, an MDAC application cannot determine which columns contain the new data types by examining the metadata. Additionally, the metadata may be inconsistent for the new data types.

Keywords: kberrmsg kbhowto kbinfo KB901039

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.