Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String is too long - revisited
Message
 
 
À
29/12/2005 14:53:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01081786
Message ID:
01081814
Vues:
8
If you would be using VFP9 you can use new CAST function to get memo field. Also I don't understand why do you need this FixMemo function at all. If it's empty, then it would be empty in the result, if not - would not be empty. What is your goal for this select?

>Hi all,
>
>Here I go again. I have a select string:
>
>SELECT CR_ACT.NXTACT_ST, ALIASES.NAME_ALIAS, ADDRES.STATE, CR_ACT.INITING_AC, ;
>CR_ACT.DTE_NXTACT, CR_ACT.NXT_ACT, CONTACT.FIRST_NAME, CONTACT.LAST_NAME, ;
>TITLE_.DESCRIP, CONTACT.PHONE, CLIENTNM.CLIENT_ID, ;
>fixmemo(CR_ACT.ACTION_NOT) as action_not ;
>FROM CR_ACT, ALIASES, ADDRES, CONTACT, TITLE_, CLIENTNM ;
>WHERE ( CR_ACT.DTE_NXTACT >= CTOD("05/01/2005") .AND. ;
>CR_ACT.DTE_NXTACT <= CTOD("06/01/2006") ) .AND. ;
>.NOT. "CAN" $ RTRIM(UPPER(CLIENTNM.ACCT_STAT)) .AND. ;
>UPPER(ALIASES.ALIAS_TYPE) = "MAIN" .AND.  ;
>clientnm.client_id = "Foo" .AND. CONTACT.CLIENT_ID = CLIENTNM.CLIENT_ID .AND. ;
>CONTACT.CLIENT_ID = ALIASES.CLIENT_ID .AND. ;
>CONTACT.CLIENT_ID = ADDRES.CLIENT_ID .AND. ;
>CONTACT.ADDRES_TYP = ADDRES.ADDRESS_TY .AND. ;
>CONTACT.CLIENT_ID = CR_ACT.CLIENT_ID .AND. ;
>CONTACT.CONTACT_ID = CR_ACT.CONTACT_ID .AND. ;
>CONTACT.TITLE = TITLE_.TITLE_ ;
>ORDER BY 5 ASC, 2 ASC
>
>with the function:
>
>FUNCTION fixmemo()
>  PARAMETERS pcTablefield
>  LOCAL lcfield
>  lcfield = PADL("", 260)
>  DO CASE
>    CASE EMPTY(pcTablefield) OR ISNULL(pcTablefield)
>      lcfield = PADL("", 260)
>    CASE LEN(pcTablefield) < 256
>      lcfield = PADR(pcTablefield, 260)
>    CASE LEN(pcTablefield) > 256
>      lcfield = ALLTRIM(pcTablefield)
>  ENDCASE
>  RETURN lcfield
>ENDFUNC  && end of fixmemo()
>
>and I still get the error "string is too long"
>
>any ideas?
>
>TIA
>Beth
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform