DF011: The WRITETEXT, UPDATETEXT, and READTEXT statements are deprecated.

The topic describes the DF011 T-SQL code analysis rule.

Category

Deprecated

Message

The WRITETEXT, UPDATETEXT, and READTEXT statements are deprecated.

Description

The WRITETEXT, UPDATETEXT, and READTEXT statements are used in support of the TEXT datatype, which was deprecated in SQL Server 2005.

Code example

READTEXT

USE pubs;
GO
 
DECLARE @ptrval VARBINARY(16);
SELECT @ptrval = TEXTPTR(pr_info)
FROM pub_info pr
  INNER JOIN publishers p
    ON pr.pub_id = p.pub_id AND p.pub_name = 'New Moon Books';
 
READTEXT pub_info.pr_info @ptrval 1 25;
GO

UPDATETEXT

USE pubs;
GO
 
ALTER DATABASE pubs SET RECOVERY SIMPLE;
GO
 
DECLARE @ptrval BINARY(16);
SELECT @ptrval = TEXTPTR(pr_info)
FROM pub_info pr, publishers p
WHERE p.pub_id = pr.pub_id
  AND p.pub_name = 'New Moon Books'
 
UPDATETEXT pub_info.pr_info @ptrval 88 1 'b';
GO
 
ALTER DATABASE pubs SET RECOVERY FULL;
GO

WRITETEXT

USE pubs;
GO
 
ALTER DATABASE pubs SET RECOVERY SIMPLE;
GO
 
DECLARE @ptrval BINARY(16);
SELECT @ptrval = TEXTPTR(pr_info)
FROM pub_info pr, publishers p
WHERE p.pub_id = pr.pub_id
  AND p.pub_name = 'New Moon Books'
 
WRITETEXT pub_info.pr_info @ptrval 'New Moon Books (NMB) has just released another top ten publication. With the latest publication this makes NMB the hottest new publisher of the year!';
GO
 
ALTER DATABASE pubs SET RECOVERY SIMPLE;
GO

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?