Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error: 2072 - cursor cannot be modified because it ...
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01183834
Message ID:
01277927
Views:
36
It turns out that this cause me OTHER problems down the road. Many days later, I found out what was causing the bahavior...

I was having strange behavior with a table buffered cursor (created with SQL passthrough). In one case an UPDATE statement issued against the cursor gave me this message:

2072 Cursor cannot be modified because it contains an unsaved record.


Why would a table-buffered cursor need to be saved before you could make a change to a record? Weird.

In the OnSave() of the form, I got other strange errors. TABLEUPDATE, TABLEREVERT, GETFLDSTATE, GETNEXTMODIFIED didn’t work on the cursor at all – unless I SET STEP ON. Yikes. Nothing and I mean nothing but SET STEP ON made it work.


I FINALLY tracked it down. The table was bound to a grid. The Valid() event of one of the textboxes in one of the columns called a method on the form … which changed the value the textbox was bound to…

Apparently, having the textbox bound to the value and then having it call a routine that changes that very same value doesn’t work very well in VFP <s>.

Apparently, this is what causes error 2072, at least some of the time!

Cheers!
Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform