WRITETEXT with a properly protected text pointer : WRITETEXT « Data Types « SQL Server / T-SQL Tutorial






4> CREATE TABLE pub_info
5> (
6>    pub_id         char(4)           NOT NULL,
7>    logo           image                 NULL,
8>    pr_info        text                  NULL
9> )
10> GO
1> 
2> BEGIN TRAN
3> DECLARE @mytextptr varbinary(16)
4> SELECT @mytextptr=TEXTPTR(pr_info)
5>     FROM pub_info (UPDLOCK) WHERE pub_id='9999'
6> IF @mytextptr IS NOT NULL
7>     WRITETEXT pub_info.pr_info @mytextptr 'Hello Again'
8> COMMIT TRAN
9>
10> GO
1>
2> drop table pub_info;
3> GO
1>
2>








5.28.WRITETEXT
5.28.1.WRITETEXT with a properly protected text pointer