Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why doesn't this work?
Message
 
To
01/03/2005 11:50:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00991627
Message ID:
00991634
Views:
15
You should use filepointer instead of the filename:

Private CodeLine
CodeLine = ""
lnfp=Fcreate("Begin.prg",0)
CodeLine = "Close tables"
Fwrite(lnfp,CodeLine)
....
Fclose(lnfp)

>I used to do this in my sleep a century or two ago. Now that I am an old guy . . . . . ??
>
>
>Private CodeLine
>CodeLine = ""
>Fcreate("Begin.prg",0)
>Fopen("Begin.prg",2)
>CodeLine = "Close tables"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Safety Off"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Talk Off"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Deleted On"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Exclusive On"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Century On"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Sysmenu Automatic"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Confirm On"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Set Cpdialog Off"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Do DefineVariables"
>Fwrite("Begin.prg",CodeLine)
>CodeLine = "Do InitializeVariables"
>Fwrite("Begin.prg",CodeLine)
>Fclose("Begin.prg")
Previous
Reply
Map
View

Click here to load this message in the networking platform