Discussion:
Cannot Write to a Read-Only File
(too old to reply)
Dennis Allen
2010-12-29 17:36:56 UTC
Permalink
Hi. Here's a weird problem. Someone sent me this simple FoxPro for DOS
program, demo.prg and it's stand alone demo.exe:

SET CONSOLE OFF
CLEAR ALL
CLEAR
NAMEN=SPACE(20)
@ 10,35 SAY "NAME" GET NAMEN
READ
NAME=NAMEN
USE DEMO
GOTO BOTTOM
APPEND BLANK
GATH MEMV

If you run demo.exe, after the READ, you get "Cannot Write to a
Read-Only File". Now I can create and run a demo.fxp, no problem. If I
create my own stand alone FoxPro 2.6a for DOS demo.exe, that runs
without a problem. Any ideas what's wrong with the original demo.exe?
If the guy has a busted compiler, how would he fix it?
Dan Freeman
2010-12-29 17:54:23 UTC
Permalink
Post by Dennis Allen
Hi. Here's a weird problem. Someone sent me this simple FoxPro for DOS
SET CONSOLE OFF
CLEAR ALL
CLEAR
NAMEN=SPACE(20)
@ 10,35 SAY "NAME" GET NAMEN
READ
NAME=NAMEN
USE DEMO
GOTO BOTTOM
APPEND BLANK
GATH MEMV
If you run demo.exe, after the READ, you get "Cannot Write to a Read-Only
File". Now I can create and run a demo.fxp, no problem. If I create my own
stand alone FoxPro 2.6a for DOS demo.exe, that runs without a problem. Any
ideas what's wrong with the original demo.exe? If the guy has a busted
compiler, how would he fix it?
Compilers don't "bust".

This sounds like he included the dbf in his project when compiling the
exe, which would make it read-only.

Dan
Dennis Allen
2010-12-30 00:14:06 UTC
Permalink
Ah. Should have known. Thanks...Dennis
Post by Dan Freeman
Post by Dennis Allen
Hi. Here's a weird problem. Someone sent me this simple FoxPro for
SET CONSOLE OFF
CLEAR ALL
CLEAR
NAMEN=SPACE(20)
@ 10,35 SAY "NAME" GET NAMEN
READ
NAME=NAMEN
USE DEMO
GOTO BOTTOM
APPEND BLANK
GATH MEMV
If you run demo.exe, after the READ, you get "Cannot Write to a
Read-Only File". Now I can create and run a demo.fxp, no problem.
If I create my own stand alone FoxPro 2.6a for DOS demo.exe, that
runs without a problem. Any ideas what's wrong with the original
demo.exe? If the guy has a busted compiler, how would he fix it?
Compilers don't "bust".
This sounds like he included the dbf in his project when compiling the
exe, which would make it read-only.
Dan
Continue reading on narkive:
Loading...