Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MemoWidth
Message
 
To
01/10/2012 08:29:02
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01554024
Message ID:
01554053
Views:
55
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform