September 5, 2003 at 4:21 am
The "UPDATETEXT function" on the second last line below returns the following error intermittently "NULL textptr (text, ntext, or image pointer) passed to UpdateText function" Does anyone know why it does this?
DECLARE @jstext nvarchar(4000),
@candidatedescr nvarchar(250),
@ptrJobSpecText binary(16),
@JobSpecTextValid bit
--need to set JobSpecText pointer by updating the field first...
UPDATE JobAds WITH (ROWLOCK)
SET JobSpecText = N' '
WHERE JobAdNo = 1
--set the text pointer
SELECT @ptrJobSpecText = TEXTPTR(JobSpecText)
FROM JobAds
WHERE JobAdNo = 1
--check if pointer is valid
DECLARE @ptrvalid int
SELECT @ptrvalid = TEXTVALID(JobAds.JobSpecText, @ptrJobSpecText)
FROM JobAds
WHERE JobAdNo = 1
IF @ptrvalid = 0
BEGIN
--need to set JobSpecText pointer by updating the field first...
UPDATE JobAds WITH (ROWLOCK)
SET JobSpecText = N' '
WHERE JobAdNo = 1
--set the text pointer
SELECT @ptrJobSpecText = TEXTPTR(JobSpecText)
FROM JobAds
WHERE JobAdNo = 1
END
SET @jstext = @jstext + @candidatedescr + N' '
UPDATETEXT JobAds.JobSpecText @ptrJobSpecText NULL 0 @jstext
IF @@error <> 0 goto errorHandler
September 8, 2003 at 8:00 am
This was removed by the editor as SPAM
September 8, 2003 at 2:54 pm
September 9, 2003 at 1:35 am
thanks , I will investigate using in row text ...
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply