Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error: 2072 - cursor cannot be modified because it ...
Message
De
09/01/2007 12:00:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Error: 2072 - cursor cannot be modified because it ...
Divers
Thread ID:
01183834
Message ID:
01183834
Vues:
183
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform