Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to store numbers in a prg file?
Message
From
10/09/2002 18:37:08
 
 
To
10/09/2002 18:27:55
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00699107
Message ID:
00699110
Views:
19
>Hi All:
>
>I have a table from which I would like to traverse down thru the table and store the number from field1 in that table to a prg file. e.g
>. the prg file after numbers are stored would look like:
>
>111
>112
>113
>114 etc
>

By a PRG file, do you mean simply a text file, or do you need to insert the information into something that is actually going to be treated as running code? If the former, it's trivial; simply:
SELECT STR(FIELD1,3) FROM MyTable TO FILE MyOutputFile.PRG ORDER BY FIELD1
>I would also like to programatically insert each of the numbers form a prg file which will be stored as shown above, into a table that will be programatically created.
>
CREATE CURSOR MyCursor (FIELD1 I)
APPEND FROM MyOutputFile.PRG TYPE DELIMITED
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform