Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot update cursor since read-only

Status
Not open for further replies.

David Higgs

Programmer
May 6, 2012
406
GB
My application runs fine in "Development Mode". However after compiling a ".app" file and then running it, I get the "cannot update cursor, since it's read only" error. I have checked the Directory (windows explorer) where the DBF files are kept to see if it was set to 'read only', it was, so I changed the properties to the directory and sub directories by removing read only status. When I run the app I get the same problem and the directories have reverted back to read only status.

Running VFP 9 with WIN 7.


Regards,
David
 
Mayve the table is included in the project.
Check the "Data" page of your project.

Respectfully,
Vilhelm-Ion Praisach
Resita, Romania
 
The Table is included in Project under Data Page / Freetables

Regards,
David
 
That alone doesn't matter, but whether it's set to be included in the APP,EXE or DLL you build or not.
There has to be a small striked circle at the left side of the table name to exclude it from the build.
It's fine to have it in the project manager for easy access duríng development, but when it is included (you must do this intentially, by default any dbf is not included) this means it's compiled into the final product, a USE uses it from there and readonly, otherwise changing or adding data would need to change the EXE at runtime, that's something prohibitetd, therefore all data embedded into an EXE is readonly.
There is nothing in the build automatically setting readonly flags though, neither in files nor in directories.

Bye, Olaf.
 
Thank you all for your help.

Olaf,
It was indeed the "small striked circle" that was missing on a couple of files. How that happened, I don't know.

All now appears to be working ok!!

Thanks again for the help. [bigsmile]

Regards,
David
 
The "small striked circle" missed since you had included the file, but forgotten to mark it as Excluded. Kind of counter intuitive, but that's how VFP works.
 
Kind of counter intuitive, but that's how VFP works.

Well, we're talking about a language with commands like WAIT WINDOW NOWAIT and EDIT NOEDIT. There's no reason to go looking for elegance. [bigsmile]
 
Well, I double chekced, if you add a table into the project by default it is excluded fomr compilation. It doesn't mattter, if via dra&drop or via Add button of the project manager.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top