Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Walters
  Where is Paul Walters?
 Gladstone
 Michigan - United States
 Paul Walters
 To: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 Tags
Subject: RE: pesky read only problem
Thread ID: 78809 Message ID: 78840 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Distribution and InstallShield
Date: Sunday, October 09, 2005 4:29:04 PM         
   


Good morning,

I posted the following at the MS newsgroups. I think this is the same exact problem. Note that I can display and sort data but cannot append blank, etc.

I have never used the noupdate command. I have relied on either read only or filters at the table level, or read only, setfocus, enabled and valid-event at the field level to control input. These tables are not read only.

I use an error handling routine that displays 'error 111', 'Cannot update cursor.' I have rebuilt the form, table, database, etc. repeatedly with the same result. The newest version gives a much better response. Instead of popping the error message constantly it displays the following; 'The table is read only, you will not be able to edit it.' once upon initiating the form. This is not coming from the error routine, but displayed in the corner as a it were a default message from the valid event. The end result is the same.

*********************************************************************

I have been receiving error 111 - "Cannot update cursor" when running either a compiled application or executable. This includes applications written 8 years ago that worked until I have recently opened them. I am using VFP 5.0. Here is an example of the problem and what I have tried.

I have created a variety of forms, all using grids, that display tables,
both free and contained in a dbc. I have used tables filtered and not,
ordered and not, exclusive and not. I have launched the screen from another screen and from a menu. I have created the forms in formsets and alone. I have programatically opened the tables. I have even preceded each code usage with "if used(...." or close tables all and open "use .......... exclusive" or "use .........again". I have had messageboxes display the datasession, tables, etc.

All forms work until I do one of the following;
1) Issue the command "Append Blank"
2) Use any command that begins with "Thisform" or "Thisformset" with the
possible exclusion of "Thisform.Refresh"
3) call a defined form or formset property or method regardless of content, even blank or commented out.
4) call a program file, procedure or function external to the form but
included in the project.

Here is an example of the steps and what happens.
1) Create and modify a new form, populate and format data environment, add and format a grid, add button to close the form with thisform or
thisformset.release.
1.1) Save the form and rebuild the project and run under vfp 5.0
environment. All OK.
1.2) Compile as an executable, Close VFP, EXE, all OK.
2) Modify form adding "OnMouseUp" event to headers to sort ascending or
descending (with 'control' key)
2.1) Repeat step 1.1, testing sort feature, all OK.
2.2) Repeat step 1.2, testing sort feature, all OK.
3) Modify form adding a button to add a new record to the grid. Create
'Click' event with 'Append Blank'.
3.1) Repeat step 1.1, testing Add New feature, all OK.
3.2) Repeat step 1.2, testing Add New feature, Error 111 Cannot update cursor.

I have modified every conceivable grid property including AllowAddNew,
ReadOnly, Enabled. I have created new projects, tables, and databases. I have programatically opened tables and successfully made changes. I am beyond lost at this point. MS says VFP 5.0 is not supported, no help there.


> Hi Pete
>
> > after months of working on my project after hours it is ready to show!
> > in foxpro 9, the program runs how i want it to.
> > on the application builder i have used build... made a win32 executable, and clicked all options but running code.
> > i have copied the vfp9r.dll and vfp9renu.dll libraries to the executable folder.
> > when i run the executable program the execution gives and error at the point i first write to a table.
> > it reports that the "cursor" is read only.
> > now this line of code is an insert SQL command that inserts to a *table* (not a cursor). it works fine when running from vfp. the table is not read-only in dos.
> > if i skip this step, the program shows a splash-screen, initialises variables, then gets to the main form, then exists without an error code.....

>
> Without knowing exactly what the line of code is, it is hard to guess. Clearly something is wrong at that point and probably you are in the wrong wrok area, or some value that you think exists doesn't (or has a wrong value). But there really isn't enough information here to tell you what that might be.
>
> Have you checked in the debugger to see the state of the system when the error occurs?
>
> > on a related note of distribution, my program is a single form, tab based application, it does not need menu-bars - how do you hide them in the end-application?
>
> Check SET SYSMENU in the help file
>
>
> Regards
> Andy Kramek
> Microsoft MVP (Visual FoxPro)
> Tightline Computers Inc, Akron Ohio, USA


ENTIRE THREAD

pesky read only problem Posted by peter gee @ 10/9/2005 4:08:24 AM
RE: pesky read only problem Posted by Andy Kramek @ 10/9/2005 2:20:39 PM
RE: pesky read only problem Posted by Paul Walters @ 10/9/2005 4:29:04 PM
RE: pesky read only problem Posted by Andy Beebe @ 10/9/2005 6:38:59 PM
RE: pesky read only problem Posted by Andy Kramek @ 10/9/2005 9:13:54 PM
RE: pesky read only problem Posted by Paul Walters @ 10/9/2005 11:44:13 PM
RE: pesky read only problem Posted by peter gee @ 10/10/2005 2:17:29 PM
RE: pesky read only problem Posted by John Peart @ 10/10/2005 3:05:06 PM
RE: pesky read only problem Posted by peter gee @ 10/10/2005 10:59:44 PM