UPDATETEXT and WRITETEXT alternatives

suddenelfilio

Well-known member
Joined
Jun 3, 2004
Messages
144
Location
Belgium
Programming Experience
5-10
Hello,

I was trying on programming a blobstream class of which I got the idea freom the .net magazine #12. At the end there was mentioned trying not to use these functions in future development as they are going to be deprecated in the future.

After som research I found dat there is alternative syntax to the UPDATE statement that allowed some similar functionality for WRITETEXT. For example
UPDATE table
SET column .WRITE(bytes,offset,length)
WHERE rowid = id

However this doesn't seem to work for a column with datatype image. I get an error saying that it is not possible to use commands om image types. So I suppose that this will work only with varbinary(max), varchar(max) en nvarchar(max) data typen.

But what to use when the datatype is image, text or ntext? I want not to use the WRITETEXT any more. I tried the STUFF function, but that doesn't seem to work either...

To replace READTEXT I can use the SUBSTRING function which works just fine.

Anybody an idea?
 
Back
Top