Monday, February 20, 2012

New data types in SQL Server 2005

SQL Server 2005 has some new data types like XML, varchar(MAX). Are they
supported by C# in Visual Studio 2003 and 2005?Hi Roy
From http://tinyurl.com/c2glu
DataTypes - UDTs, the XML data type, and "MAX" BLOBs and CLOBs
SQL Server 2005 adds support for user-defined types, a native XML data type
and better large data support. Large data support is improved by using the
Transact-SQL types VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX).
User-defined types and a native XML type are defined by the SQL:1999 and
SQL:2003 specifications. To use these data types with SqlClient, new classes
in the System.Data.SqlTypes namespace are defined (SqlUdt and SqlXml),
support is added to the SqlDbTypes enumeration and IDataReader.GetValue was
enhanced to support returning UDTs as .NET Object types, and support
returning XML as a .NET String.
These new SQL Server 2005 types are supported in DataReaders returned from
SQL SELECT statements and as Parameters using SqlParameter. A special class,
SqlMetaData, can return information about extended properties of these new
data types, such as the XML schema collection that a strongly typed XML
column adheres to, or the database name of a UDT. You can use these types
from the client directly, in generic code, and also in the DataSet. Finally
you can perform partial updates on the "MAX" data types from the client,
which required using special SQL functions before ADO.NET 2.0.
You may also want to look at the Hands-On Labs in the resource kit.
For more information check out http://msdn.microsoft.com/SQL/2005/
John
"Roy" wrote:

> SQL Server 2005 has some new data types like XML, varchar(MAX). Are they
> supported by C# in Visual Studio 2003 and 2005?

No comments:

Post a Comment