Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with grid control being refreshed in real time.
Message
From
13/03/1997 13:19:54
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00024097
Message ID:
00024131
Views:
40
>>1.Do you mean that view will open tables exclusively even if SET EXCLUSIVE OFF? That's strange.
>>2.CREATE CURSOR and use it as RecordSource. Refill cursor any time before Grid.Refresh().
>>3. Use timer to update automatically.
>
>The second option you provided I'm not sure how to implement, but let me tell you what I did try in a little more detail to clarify this issue.
>
>I've created a local view that has fields, 6 of which will be visible in the gird on my form, the remaining 6 fields columns will be set to a width of 0 so user cannot see them as they are used only for setting the order of the records displayed in the grid.
>
>I add the view to my data environment of my form, then drag it into the form to create the grid. The RECORDSOURCE for the grid shows up as the alias for the view, with the RECORDSOURCETYPE set to 1 - ALIAS. I then set the number of columns to 6 for the grid and make no additional changes. I then add a timer control where the timer event code only contains a =REQUERY("myview") which automatically updates the grid every 10 seconds.
>
>The view contains a parameter that allows the user to toggle between viewing calls that are for them, and all the callbacks that need to be made, the optiongroup control I have added to the form to accomplish this also works fine. It is when I attempt to run a second copy of this form that causes a GPF error.
>
>All tables are opened as shared (some are noupdate) and the data sessions is set to PRIVATE. Note: when I add the view to the data environment, its EXCLUSIVE property is set to .T. and cannot be changed (its italicised).
>
>All I am looking to do is to get this to work in a multiuser environment and I am not sure what I am missing, but I am sure I am missing something.
>
>Thanks again...

1.Private Data Session has own data setting including SET EXCLUSIVE ON! You must reset it programmatically for each 'Private Data' form.
2. You can use cursor as a sourse doing this:
SELECT * from ... into cursor mycursor && it will create read-only cursor
thisform.grid.recordsource="mycursor"
thisform.grid.refresh
Next timer.timer() you repeat this code again
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform