Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buffering
Message
 
À
01/02/2007 14:09:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01191514
Message ID:
01191551
Vues:
12
>>>I have a form with 5 tables in the dataenvironment. The buffermodeoverride is set to 1 for all of the tables.
>>>
>>>The form's init contains:
>>>
>>>set multilocks on
>>>= CURSORSETPROP('Buffering',5, 'biditems' )  && Enable row buffering.
>>>= CURSORSETPROP('Buffering',5, 'projects' )  && Enable row buffering.
>>>= CURSORSETPROP('Buffering',5, 'projectphases' )  && Enable row buffering.
>>>= CURSORSETPROP('Buffering',5, 'lineitemspecs' )  && Enable row buffering.
>>>dodefault()
>>>
>>>The form's buffermode = 2
>>>
>>>The form has a pageframe and the pageframe contains a grid.
>>>The grid's recordsource is set
>>>
>>>thisform.df_tabs1.df_page1.grdBiditems.RecordSource = ;
>>>"select * from biditems " + ;
>>>"	inner join lineitemspecs " + ;
>>>"	on biditems.lineitemid = lineitemspecs.lineitemid " + ;
>>>"	where biditems.projectphaseid = val(this.value) " + ;
>>>"	into cursor crsTemp readwrite"
>>>
>>>The grid's AfterRowColChange contains
>>>LPARAMETERS nColIndex
>>>
>>>=tableupdate(0,.t.,"biditems")
>>>
>>>
>>>It all seems to work except the edits made in the grid are not being saved back to the biditems table. What am I missing?
>>
>>First, Buffering = 5 is not ROW buffering. It is optimistic Table buffering.
>>Second, you miss to check WHY TableUpdate is not successful:
>>
>>IF NOT tableupdate(0,.t.,"biditems")
>>   AERROR(laError)
>>   MessageBox(laError[1,2])
>>ENDIF
>>
>
>I know, I originally had it set to 3 and then changed it to 5. I just haven't cleaned up my comments yet (I want to get it working first) shame on me.
>
>Your suggested code does not produce an error. A browse of the cursor shows the values in the cursor but they are not getting to the original table.


OOOOOO, Shame on me! I just watch buffering code and TableUpdate() one. Not see that your grid RecordSource is not BidItems table.
OK, What version of VFP?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform