Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh data in a grid
Message
From
22/04/2011 14:38:48
 
 
To
21/04/2011 01:01:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01507968
Message ID:
01508146
Views:
30
>>>Hello All!
>>>
>>>I'm having difficulties with the following;
>>>
>>>I've a grid populated with data from a table which I create using (without qoutes)
>>>
>>>"Select fld1, fld2, fld3, blah2.fld4
>>>FROM blah1, blah2
>>> WHERE blah1.id = blah2.id
>>>AND blah2.fld5 = .T.
>>>INTO TABLE tmpRoster"
>>>
>>>.grdRoster.RecordSource = "tmpRoster"
>>>.grdRoster.Refresh
>>>
>>>Now the above works fine. However, I've some code based upon a Dbl Click which upon saving, change blah2.fld5 to .F. When I rerun the SELECT statement, it doesn't reflect the change (i.e. in other words the record still show, but the data has been properly updated).
>>>
>>>Another thing, when ran in the VFP environment, it works. Within the application, it doesn't.
>>>
>>>It's driving me crazy as I thought it would be the simplest way to accomplish this task. What am I missing/not seeing? (I didn't add any other code but focused on what gathers the data)
>>>
>>>TIA,
>>>
>>>Vernon
>>
>>Sorry, blah2.fld5 should be blah2.fld4
>
>Before the replace the field in the table you need to Seek() or Locate the correct record in Blah2:
>In the Double click event write:
>
>SELECT Blah2
>LOCATE FOR Id = tmpRoster.ID
>REPLACE fld5 WITH .F. IN Blah2
>
>
>That requires that ID is a unique field and that you add this key in the select statement into tempRoster. You also need to make sure that tmpRoster is not buffered.


Christian,

You suggested something which may be the culprit! BUFFERING! I thing the table is buffered. Anywho, I will make the necessary changes and see what happens.

Thanks,

Vernon
Previous
Reply
Map
View

Click here to load this message in the networking platform