Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buffering
Message
De
01/02/2007 14:49:31
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
01/02/2007 13:39:09
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:
01191570
Vues:
10
Hi Donw

>I have a form with 5 tables in the dataenvironment. The buffermodeoverride is set to 1 for all of the tables.

>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?

Are changes being made to the tables or to the cursor in the grid? If it is to the cursor in the grid, you need no buffering for the tables at all.

Just imagine you're talking to SQL Server. You run a query and a cursor is returned. You edit the cursor (not the real tables) and you send the changes back to SQL server which updates the tables.

If you buffer the tables and use a cursor (which is something like a buffer), you're double buffering and you will have to tableupdate the cursor and the tables.

If you are only editing the grid's cursor, you need to convert this cursor to an updatable cursor with the following cursorsetprop settings: Tables, KeyFieldList, UpdatableFieldList, UpdateNameList and SendUpdates.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform