Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MemoWidth
Message
 
À
01/10/2012 08:29:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01554024
Message ID:
01554053
Vues:
54
I am parsing data stored in a memo field using mline(). I scan through the memo field in a for next loop.
Example:
Data stored looks like this:
Re-Order Note:Make sure these are not the solder on type!!:09/30/2012
Alternate:2610321608:8/30/2011

m.lcSubList = TableName.MemoFieldName

for m.i = 1 to MEMLINES(lcSubList ) && returns 3 if set memowidth is not in the datasession init
m.lcItem = MLINE(lcSubList, i)
m.lnFirstColon = AT(":", lcItem)
m.lnSecondColon = AT(":", lcItem, 2)
m.lcNoteType = SUBSTR(lcItem, 1, (lnFirstColon-1))
m.lcPartNumber = STREXTRACT(lcItem,":",":")
m.ldIDate = IIF(lnSecondColon=0, DATE(), CTOD(SUBSTR(lcItem, lnSecondColon + 1)))
next

I then use the lcNoteType, lcPartNumber and the ldIDate in the form.

The functions above depend on the memowidth setting. If I place the set memowidth setting in the form somewhere (load), this function does no work correctly. Moving the set memowidth statement to the init of the data session, it works as expected.

The help says the default setting for memowidth is 50. Line one of the example is 69 characters in length.

Is this proper?

Thank you in advance,

Gary De Lecce
Driving toward a Tactical Edge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform