Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uncommitted changes error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00622544
Message ID:
00622550
Vues:
26
>I am using the following code in an invoicing program to make sure that when an inventory quantity is updated that I am getting the correct quantity from the inventory table. The view and the base table are both in the data environment with BufferModeOverride set to 5 on both. Everything works fine at this point.
>
>The problem comes in when I add another myinventorytable to the data environment with a different alias name. I am using this second table to have the ability to do searches and not move the record pointer in the base table. Anyway with the second table in the data environment I get the error: “Table buffer for alias myview contains uncommitted changes”. The BufferModeOverRide for the second table is 1. Any suggestions would be appreciated.
>
>
>
>
>lcQty_pk = mycursor_qtypk
>requery('myview')
>select myview
>replace myview_qty with myview_qty - mycursor_qty
>tableupdate(.T.)
>select myinventorytable
>tableupdate(.T.)
>
Hi Pat,

I am not sure why you buffer the underlying table - typically it is not necessary. I would buffer only a view. Try to check what your TABLEUPDATE returns, i.e:

llResult = tableupdate(.T.)

Also it is always a good idea to specify the area where you do the REPLACE

REPLACE myview_qty WITH myview_qty - mycursor_qty IN myview
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform