This example demonstrates how to create a new adTempus client session. All API activity takes place within the context of a session.
The Application.Connect and Application.ConnectRemote methods are used to logon on to adTempus, creating a client session (represented by a Scheduler object).
The ConnectAdtempusServer function below demonstrates how to do this. You can use the ConnectAdtempusServer helper function in your own code to simplify session creation.
ConnectAdtempusServer accepts three optional parameters:
'ConnectAdtempusServer creates a client session with an adTempus server. 'Parameters ' serverName Name or address of the adTempus server. Use an empty string ("") to connect to the local server. ' userID Optional Windows user ID to use for authentication. If none is specified, the connection is ' made under the identity of the calling user. ' password The password corresponding to the userID public function ConnectAdtempusServer(optional serverName as string="",optional userID as string="",optional password as string="") Dim theApp As Application Dim aScheduler as Scheduler 'create an application object theApp = New Application 'create a connection aScheduler = theApp.ConnectRemote(serverName,userID,password) return aScheduler end function
adTempus API Reference version 3.0.0.0, revised 10/30/2008
|