I have a procedure that concatenates TEXT fields inside another text field. Table A.TextField is composed of the concatenation of Table B.TextField1 + VARCHAR(8000) + B.TextField2 data.
I get the TEXTPTR for the TextField1 and TextField2 and what I do is just to UPDATETEXT 3 times the A.TextField.
At the end of the operation, I´m losing data, I have no complete the TEXT of B.TextField.
Is there any limitation with UPDATETEXT? It will get all the TEXT value or just 8000 chars?
This is the code example.
--GET POINTERS
SELECT @solutionTEXT = TEXTPTR(solution_text),
@problemTEXT = TEXTPTR(problem)
FROM B WHERE solution_id_serial = @solution_id_serial
--INSERT INTO A TABLE
INSERT INTO A VALUES(@solution_id_serial,NULL)
--GET TEXT POINTER TO MODIFY
SELECT @allsolutionTEXT = TEXTPTR(solution_memo) FROM A WHERE solution_id_serial = @solution_id_serial
--1ST UPDATE
UPDATETEXT A @allsolutionTEXT NULL 0 @problemVarchar
UPDATETEXT A @allsolutionTEXT NULL 0 sl_solutions.problem @problemTEXT
UPDATETEXT A @allsolutionTEXT NULL 0 @spaceVarchar
--2ND UPDATE
UPDATETEXT A @allsolutionTEXT NULL 0 @solutionFilesLabel
UPDATETEXT A @allsolutionTEXT NULL 0 @allsolutionfiles
UPDATETEXT A @allsolutionTEXT NULL 0 @spaceVarchar
--3RD UPDATE
UPDATETEXT A @allsolutionTEXT NULL 0 @solutionLabel
UPDATETEXT A @allsolutionTEXT NULL 0 sl_solutions.solution_text @solutionTEXT
UPDATETEXT A @allsolutionTEXT NULL 0 @spaceVarchar
Thanks in advance!