Procedure stockée avec ntext dans SQL server 2000
Salut,
J’ai construit une procédure stockée qui doit retourner type ntext de champ CONSEILLER.COPIECV. Ce champ doit contenir 2-3 pages de texte.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| CREATE PROCEDURE [cherch_CONSEILLER_1]
(@NO_CONSEILLER_CHERCH [int],
@NO_SEQUENCES [int] OUTPUT,
.........
@ACTIF_7 [bit] OUTPUT,
@COPIECV_8 [varbinary](16) OUTPUT,
@REMARQUES_9 [varchar](400) OUTPUT)
AS SELECT
@NO_SEQUENCES = c.NO_SEQUENCES,
.......
@REMARQUES_9 = c.REMARQUES,
@COPIECV_8 = TEXTPTR(c.COPIECV)
FROM PERSONNE p, USAGER u, CONSEILLER c
WHERE c.NO_CONSEILLER = @NO_CONSEILLER_CHERCH AND
c.NO_SEQUENCES = u.NO_SEQUENCES AND
p.NO_SEQUENCES = c.NO_SEQUENCES
READTEXT CONSEILLER.COPIECV @COPIECV_8 1 14000
GO |
Elle retourne bien tous les champs sauf CopieCV du type ntext justement. J’ai un message :
Citation:
The offset and length specified in the READTEXT statement is greater than the actual data length of 4.
Output de la procédure est :
Code:
1 2 3 4
|
@ACTIF_7 = 1
@COPIECV_8 = [][]
@REMARQUES_9 = test |
Est ce qu'il y a une erreur dans ligne avec READTEXT? Quoi faire pour que elle retourne le texte?
Merci.