Sunday 27 March 2011

Text Type Deprecated in SQL Server 2008 and above

How to handle MS SQL Text type data now that it is deprecated


The text type, which was always a special case when creating triggers, stored procedures and the like is depracated from SQL Server 2008.

To update systems, replace the TEXT type with VARCHAR(MAX) or NVARCHAR(MAX)

In vb.net, change the parameter declarations from TEXT, to this
        cmd.Parameters.Add("@Notes", SqlDbType.VarChar, -1).Direction = ParameterDirection.Output

No comments: