TSessionData

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TSessionData >

TSessionData

 

Applies to client/server development with the Apollo Database Server.

 

Apollo Database Server supports ServerDLLs, which are special DLLs that you can create using Delphi or C++Builder and register with the Apollo Database Server using the Apollo Server Manager. These ServerDLLs contain functions which get called directly by the Apollo Server on the server computer.

They are in effect DLLs that run on the server.

 

ServerDLLs are efficient since they run on the server, however in order to be useful, ServerDLLs need access to various database related information such as paths, aliases, workareas etc. that may be set from the Apollo client application. In other words, your client-side Apollo application can pass parameters and data to your ServerDLL. The way a ServerDLL method or funciton accesses information on the client-side application is via the TSessionData object.

 

A ServerDLL function must implement the following syntax:

(See ..\Server\ServerDLL sample.dpr for details)

 

procedure ServerRenameFile( SessionData: TSessionData; ExecType: TExecType ); stdcall;

 

TApolloSessionData is a non-visual object (inherits from TPersistent) that gives you access to the following properties and events:

 

ErrorMsg: String

Error message. 255 chars max. length.

ErrorNo: Integer

Error number. A value -1 is internal anything else is user-defined. Range is -65535..65535.

DLLPath: ShortString

Path where the ServerDLL resides

Params: TParams

Pass parameters to the ServerDLL method as you normally would using TParams

DatabaseName[ workarea: integer]: String

Get/Set the database name for the given workarea

DataPath workarea: integer]: String

Get/Set the data path for the given workarea

TableName[ workarea: integer]: String

Get/Set the table name for the given workarea

TableAlias[ workarea: integer]: String

Get/Set the table alias for the given workarea

TableDriver[ workarea: integer]: String

Get/Set the table type (driver) for the given workarea.

See TableType

Tag: integer

Get/Set the tag to use for the currently selected workarea

WA: integer

Current workarea for the client application

WASelected[ workarea: integer]: String

Select a given workarea

DLLMessage( msg: String)

Write a message the Apollo Server's event log.

 

See Also

TApolloServerDLL , Using ServerDLLs