Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Maxframe Professional Question
Message
De
29/11/2000 20:43:39
 
 
À
29/11/2000 12:07:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00446846
Message ID:
00447144
Vues:
10
>Hi,
>
>I am implementing frmDEGridNav2Pages using a buffered (5) view cursor for input. The underlying table is buffered too.
>
>When click Save button while adding or modifying a record the buffer does not seem to be posted in either the cursor or underlying table. I did a trace and it would seem that the transaction got fully commited.
>

The problems are probably the result of buffering both an updatable view and the underlying tables it uses. Since all queries and aggregations are run against committed data, double buffering causes lots of problems with requery- and refresh-related errors from users that end with "...but if you close the form and the go back in, the right stuff is there."

Double buffering results in some fairly annoying and apparently random behaviors in your forms when adding records through a view, especially where a form has more than one view that reference the same table. When both a view and the underlying table are buffered, changes to a view require two independent TABLEUPDATE() operations to occur - the first, done on the view, commits the view's changes to the table's buffer, and the second, done on the table, commits the changes in the table's buffer to the physical table. If you don't make both TABLEUPDATEs, or you TABLEUPDATE the table before the view, the results are confusing at best.

You can change your Save logic to explicitly issue both commands, and deal with the possible results of failures in both calls, especially troublesome using optimistic strategies, but I'd recommend avoiding the problem entirely by buffering the view but not the underlying tables. It's easier to code and less difficult to debug.

Of course, if you own the local drugstore, YMMV, since using multiple layers of buffering will usually boost sales of headache pills, antidepressants and anxiety medications before it is fixed. < BEG >
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform