Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update a Treeview in a multiuser environment
Message
 
To
07/12/2005 18:29:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01075888
Message ID:
01075956
Views:
29
Hallo again!
I have just read the helpfile for SQL2000.
There is something called "Trigger", Can it be a way, to use a trigger that reacts when someone change the table, and then start a procedure that fetch the changed record from the server, update the local cursor and make the change on the corresponding node? I have not used triggers before but it looks usefull in this case... or am I wrong?

/Kjell

>------------------
>
>The treeview does not support natively a multiuser environment -- it is designed for a single user on a single pc; it has no knowledge of someone else changing the node structure on another PC. To enable this, you might try using bindevent (or a timer but it would be delayed) and a communication file. The scenario might go something like this:
>
>1. User one opens the form on local PC with treeview; nodes built
> from shared table; bindevent set
>2. User two opens the form on local PC with treeview; nodes built
> from shared table; bindevent set
>3. User one adds/deletes/changes node; update shared table and update
> communication file on server with timestamp of change.
>4. User two bindevent detects change of communication file; re-reads
> shared table for changes (based on timestamp) and updates local
> view of treeview.
>
>This is repeated by each user. The bindevent would be to a Win32 API that monitors files.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform