Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffering
Message
From
01/02/2007 15:03:49
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
01/02/2007 14:57:59
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01191514
Message ID:
01191580
Views:
8
>>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.
>
>Hi Mike
>
>The user is editing a cursor which is populating the grid. The goal is to have those edits reflected back into the original table.

Then you turn the cursor driving the grid into an updatable cursor and tableupdate it. No need for buffering the tables. The cursor is a buffer so to speak. :)
Previous
Reply
Map
View

Click here to load this message in the networking platform