Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement