DataSnap.ShowSessionData Sample

From Appmethod Code Examples
Jump to: navigation, search

This sample shows how to iterate over the list of active sessions on a DataSnap REST server.


You can find the Show Session Data sample project at:


The Show Session Data sample consists of a Session Test Server window that allows the creation of several sessions on a DataSnap REST server. To do that, you have to open a Browser from the sample window and log in. Then the sample displays the active session list.

How to Use the Sample

  1. Navigate to Start | Programs | Appmethod 1.14 | Samples, go to Object Pascal\DataSnap\ShowSessionData, and open ShowSessionDataExample.dproj.
  2. Build ShowSessionDataExample.dproj.
  3. Select Run > Run or press F9 to run the sample.
  4. Start the server (optional).
  5. Click the Open Browser button (this action starts the server).
  6. In the browser, enter a user name and password, and log in.
  7. Return to the project main form, and click the Update Sessions button to see a list of active sessions.


File Contains


The server container that holds the DataSnap Server components.


The server methods container holding source code for the server methods used in the Show Session Data sample.


The main form that constitutes the user interface for the Show Session Data sample.


  • TWebModule2 implements the Show Session Data itself.
  • TServerMethods2 implements the server methods available for the Show Session Data sample.
  • TForm1 is the main form that handles all controls.



See Also