Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tablebuffering Problem
Message
De
26/07/2000 15:34:57
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00397194
Message ID:
00397261
Vues:
9
Hi Rick,
Well, I ended up doing just the opposite....I found that losing the opt. table buffer and just going with row buffer solved the problem, but I see how going with table buffering and changing the table update would work as well. Which way would you suggest?

Thanks for your advice
JD

>Jimmy,
>
>At first look, you have buffering set to 5 (optimistic table) but you're doing a TableUpdate(0, ...) which only updates the current row. If other rows were modified, there's your uncommitted changes. I'd try changing it to TableUpdate(1,.T.,"intrancust") and see if that solves it.
>
>Rick
>
>>Here's the situation:
>>
>>Combo1 (with inventory_search in it's interactivechange) has item stocknumbers for selections. It searches for the record selected and populates the other objects with appropriate data. I can edit and save the very 1st record all I like. When I select a different record, choose edit and save, I get the error "Table buffer for alias intrancust contains uncommitted changes". When the error occurs, the debugger points to the Requery() immediately following a tableupdate().
>>
>>Here's the code:
>>
>>Load:
>>DBSETPROP('intrancust', 'view', 'Tables', 'Tomparco!inventory')
>>DBSETPROP('intrancust', 'view', 'SendUpdates',.T.)
>>=CURSORSETPROP("Buffering", 3, "intrancust")
>>INDEX ON stocknum TAG stocknum
>>=CURSORSETPROP("Buffering", 5, "intrancust")
>>
>>Init:
>>Thisform.Inventory_Search() && <-This is also in the interactivechange of combo1
>>
>>Inventory_Search():
>>GO TOP
>>SEEK Thisform.Combo1.value
>>IF FOUND()
>>Thisform.Combo1.value = stocknum
>>Thisform.Text3.VALUE = cut
>>Thisform.Text10.VALUE = colors
>>Thisform.Text11.VALUE = clarity
>>ENDIF
>>
>>Editbutton Click Event:
>>ThisForm.Combo1.Enabled = .F. &&Locks Combo1
>>
>>Thisform.Combo2.Visible = .T. &&takes the place of Text3
>>Thisform.Combo3.Visible = .T. &&takes the place of Text10
>>Thisform.Combo4.Visible = .T. &&takes the place of Text11
>>
>>Thisform.Text3.Visible = .F.
>>Thisform.Text10.Visible = .F.
>>Thisform.Text11.Visible = .F.
>>
>>ThisForm.Combo2.displayvalue = cut
>>ThisForm.Combo3.displayvalue = colors
>>ThisForm.Combo4.displayvalue = clarity
>>
>>Save:
>>REPLACE cut WITH Thisform.Combo2.Displayvalue
>>REPLACE colors WITH Thisform.Combo3.Displayvalue
>>REPLACE clarity WITH Thisform.Combo4.Displayvalue
>>
>>TableUpdate(0,.T.,"intrancust")
>>
>>&&Tablerevert(.F., 'intrancust')
>>REQUERY('intrancust') &&...I stopped here because this is where the error occurs
>>
>>Thanks ahead of time
>>JD
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform