Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String is too long - revisited
Message
De
29/12/2005 15:09:07
 
 
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:
01081804
Vues:
10
I need it to be a memo field in the resulting cursor or table. Can't have a memo field go into a charater field, that is the whole problem.


>A table character field cannot be longer than 254 characters.
>
>FUNCTION fixmemo()
>...
>RETURN PADR(lcfield, 254)
>
>
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform