Creating a session manager

After retrieving the user's information, use the server member function CreateObject to create a SessionMgr object. The SessionMgr object logs the user on to the system, and if the user is authenticated, creates an EnterpriseSession object. With this object, you can create the InfoStore object, which acts as the main information-retrieving interface between the Crystal Enterprise SDK and the APS.

CreateObject takes a ProgID (Programmatic Identifier) as a parameter. ProgIDs are used to uniquely identify Component Object Model (COM) components. CreateObject searches the local machine for a particular COM DLL, loads the DLL, and then has the DLL create the object. If you do not have Crystal Enterprise installed on the server, then CreateObject will not be able to find the SessionMgr object since the DLL that knows how to create it isn't there.

Beneath the code that retrieves the user's logon information, add the following.

Dim SessionManager

Set SessionManager = Server.CreateObject ("CrystalEnterprise.SessionMgr")

Go to next step:

Adding a Logon function



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com