Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a comma-delimited memory variable
Message
From
05/05/2006 10:02:01
 
 
To
05/05/2006 09:50:56
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01119574
Message ID:
01119580
Views:
20
This message has been marked as the solution to the initial question of the thread.
>Need to create a memory variable that essentially is a comma-delimited file created from a cursor. If I were to write the variable to the screen, or a report, or into a memo field, it would look like this:
>
>
>"FieldValue1","FieldValue2","FieldValue3","FieldValue4","FieldValue5","FieldValue6"
>"FieldValue1","FieldValue2","FieldValue3","FieldValue4","FieldValue5","FieldValue6"
>"FieldValue1","FieldValue2","FieldValue3","FieldValue4","FieldValue5","FieldValue6"
>
>
>I do not want to write to a physical file in order to do this.

Put this in a loop for the records required:
TCR_LF = CHR(13)+CHR(10)
TSTR = ''
FOR I = 1 TO FCOUNT()

  TSTR = TSTR + '"' + TRANSFORM( EVALUATE( FIELD(I) ) ) + '"' + IIF( I < FCOUNT(), ',', '' ) + TCR_LF

NEXT
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform