Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Memo field and 256 limit
Versions des environnements
Hi all,
My brain doesnt seem to be working today, so I hope someone can help kick start it.
Basically, I have a table with a memo field which may contain more than 256 characters.
If I:
Select co_criteria from co (where co_criteria is the memo field, it works as expected).
But we need to format some of the contents of the memo field before returning it.
So this: Select dspmemo(co_criteria) from co. This returns a string to long to fit error, I think this is because the select is returning the results back to a character field and not a memo field.
Just for info this is the function its calling:
Function DSPMemo
* this functions coverts a string/memo for passing by URL
LPARAMETERS tcString
LOCAL lcRetval
* Check if the String is not NULL
IF NOT ISNULL(tcString)
lcRetval = ALLTRIM(STRTRAN(tcString, CHR(13)+CHR(10), "-"))
lcRetval = ALLTRIM(STRTRAN(lcRetval, "'", ""))
lcRetval = ALLTRIM(STRTRAN(lcRetval, "`", ""))
lcRetval = ALLTRIM(STRTRAN(lcRetval, "&", "and"))
If Right(lcRetval, 4) = "
" Then
lcRetval = Left(lcRetval, Len(lcRetval) - 4)
EndIf
ELSE
* Return blank for NULL
lcRetval = "%20"
ENDIF
RETURN lcRetval
Is there a way around this? I'm sure there is, just I cant think of it right now.
Thanks in advance for any help.
Jon
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement