Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Submitting comma delimited data
Message
From
13/05/2011 10:50:20
 
 
To
13/05/2011 10:26:53
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01510319
Message ID:
01510599
Views:
56
>>>>
>>>>Success!
>>>>
>>>>As soon as I saw your previous message I went back and looked at the GETWORDCOUNT() and realised you hadn't specified the comma as the delimiter. Glad you worked it out.
>>>>
>>>>I had asked you to check what GETWORDCOUNT() was returning and you mentioned it was 2, not sure how you checked that :)
>>>
>>>
>>>That was in the command window itself, and I had the comma in there. It didn't dawn on me until I went back through and checked for the 50th time that I had no comma in my actual code :)
>>
>>LOL, I had just gone back through the thread to see how that had happened.
>
>One last thing if you don't mind, could you explain your m.msg code?
>
>
m.msg= m.msg + CHR(13) + CHR(10) + [Exported ]+m.bn+[T2.xls]
>
>I'm not sure I see how it's grabbing all the relevant record numbers and what makes it repeat "Exported" for the number of records, I was trying to change it to have "Exported " print once, and then each record number separated by commas again.
>
>I'm really starting to hate commas.

:)

what that code does is add CHR(13) + CHR(10) + [Exported ]+m.bn+[T2.xls] on to the entire string each time it goes through the loop.

To test it out try this code in your command window:
m.msg = ""
for i = 1 to 10
   m.msg = m.msg + CHR(13) + CHR(10) + [Exported ] + TRANSFORM(m.i) + [T2.xls]
endfor
?m.msg
this will echo onto your screen how the string gets built up. If you just want Exported to be used once, do it like this:
CLEAR
m.msg = ""
for i = 1 to 10
   m.msg = m.msg + CHR(13) + CHR(10) + TRANSFORM(m.i) +[T2.xls]
endfor
m.msg = [Exported ] + m.msg
?m.msg
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform