Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error: 2072 - cursor cannot be modified because it ...
Message
From
09/01/2007 12:00:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Error: 2072 - cursor cannot be modified because it ...
Miscellaneous
Thread ID:
01183834
Message ID:
01183834
Views:
182
Hello,

I was wondering if anybody had come across error 2072 whilst working with table cursors.

I have a small grid of around 1 to 100 records that displays a single field (one of several) alongside an editbox that displays the contents of the selected record's memo field.

The cursor displaying the contents is one that I have created with a CREATE CURSOR statement and then populated with an INSERT INTO ... SELECT FROM statement.

The first thing I do when the interface starts is select the top record within the grid and then try to enter text into the edit box. Every timje I do this results in the undocumented error number 2072:

"cursor cannot be modified because it contains an unsaved record"

Suspending the error displays my applications READ EVENTS in the debugger; ignoring the error shuts my application down, returning to the VFP session that I have called it from.

If suspend the error and resume the error may be called again by further attenpts to enter text into the edit box. If I continue to move the record pointer up and down the grid the error may or may not occur when I attempt to enter text into the edit box.

If I suspend the error and browse the cursor separately and edit the memo field directly, the error disappears.

I also receive the error if I fire a
REPLACE MyMemo WITH "Test" IN MyCursor
but not after moving the record pointer up and down for a while.

It is worth noting that I am not using any specific buffering or data environment settings other than the default. I did try a CURSORSETPROP - SendUpdate but this will not work on table cursors.

Has anybody else come across similar behavior and can anybody advise a way to stop this from happening?

Many thanks in advance for any help anyone can provide.

Regards,
Ben Sugden

"Remember to enjoy hunting - and that means relishing the search for the product that has never been advertised or placed handily at the front of the shop; Life begins on the uppermost shelf, avoid guide books and top 10's like the plague." - Ramsey Dukes
Next
Reply
Map
View

Click here to load this message in the networking platform