Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo field and 256 limit
Message
From
04/07/2005 04:54:30
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Memo field and 256 limit
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01028738
Message ID:
01028738
Views:
62
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
Next
Reply
Map
View

Click here to load this message in the networking platform