Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Submitting comma delimited data
Message
From
13/05/2011 11:03:51
 
 
To
13/05/2011 10:50:20
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01510319
Message ID:
01510603
Views:
52
>>>>>
>>>>>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
Sorry, I edited my last reply after I realized it was in the loop and that's why it was being repeated, messy code with too much commented out is to blame. Another odd thing is the carriage return (CHR(13)) doesn't work, I don't know if it only works in an actual messagebox or what, but everything is still on one line. After I figure that out I'm done aside from some error checking. I think it's probably something to do with WW, the code works in the command window fine.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform