Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memo field and 256 limit
Message
De
04/07/2005 04:54:30
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Memo field and 256 limit
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Divers
Thread ID:
01028738
Message ID:
01028738
Vues:
63
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
Fil
Voir

Click here to load this message in the networking platform