ALI
Posts: 6
|
Posted: 02/05/2004, 4:10 AM |
|
Hi
I'm new user ..I want to see Active users in my Active user form.
How Can I do? Can you send me sample code with Events
Thanks
_________________
Thanks |
|
|
peterr
Posts: 5971
|
Posted: 02/05/2004, 4:35 AM |
|
You shouldn't need Events for this.
You only need to open the "Data Source" property of your Grid and specify there that 'Active = True'. You would do this by creating a "Where parameter" as shown here: http://docs.codecharge.com/studio/html/QuickStart/Creat...tWhereProp.html http://docs.codecharge.com/studio/html/QuickStart/Creat...earchParam.html
then just enter True as the "Parameter Source" and select Expression as "Type".
You can also read about the Data Source here: http://docs.codecharge.com/studio/html/UserGuide/Forms/FormDataSource.html
The "Data Source" is the database table/source for your Grid, which can be filtered using these parameters. Almost every Grid is filtered, sometimes using search keywords, other times using Session variables, and in your case using specific rule/expression.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
ALI
Posts: 6
|
Posted: 02/05/2004, 4:57 AM |
|
if ..I want to see Online Users ?...
Thanks
Quote peterr:
_________________
Thanks |
|
|
Nicole
Posts: 586
|
Posted: 02/05/2004, 6:27 AM |
|
Ali,
To detect and list the online users using the approach proposed by PeterR. add the extra “is_online” field to users table. Modify CCS login code and update logged in user record to set is_online to 1 (true/Yes) when user logs in.
Note that when he logs out add update table code to set is_online back to 0 (false/No)
_________________
Regards,
Nicole |
|
|
David
|
Posted: 02/05/2004, 9:00 PM |
|
What about the user didn't click LOGOUT and just close the browser, how to control?
Quote Nicole:
Ali,
To detect and list the online users using the approach proposed by PeterR. add the extra “is_online” field to users table. Modify CCS login code and update logged in user record to set is_online to 1 (true/Yes) when user logs in.
Note that when he logs out add update table code to set is_online back to 0 (false/No)
|
|
|
peterr
Posts: 5971
|
Posted: 02/05/2004, 10:01 PM |
|
You cannot control this. The server cannot know what users did on their computer without submitting any information to the server.
Although you may be able to use OnClose JavaScript to launch a new window and notify users that they should logout first.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Sean
|
Posted: 02/06/2004, 11:26 AM |
|
Nicole,
I have been trying to find out how to modify the login code, but I am having some difficulties. Since there is not established connection to the database, how would I go about updating the database table with say is_online, and last_logon?
I can't seem to do a Connection1.Execute ("update....") command. An example would be great.
Thanks.
Quote Nicole:
Ali,
To detect and list the online users using the approach proposed by PeterR. add the extra “is_online” field to users table. Modify CCS login code and update logged in user record to set is_online to 1 (true/Yes) when user logs in.
Note that when he logs out add update table code to set is_online back to 0 (false/No)
|
|
|
peterr
Posts: 5971
|
Posted: 02/06/2004, 5:27 PM |
|
I posted detailed instructions for tracking user logins/logouts at http://forums.codecharge.com/posts.php?post_id=42883
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|