SET-CLIENT( ) method
Uses the user ID associated with a sealed Client-principal object to set the default user ID for the ABL session, and attempts to set the user ID on all connected OpenEdge databases (that do not already have a user ID explicitly set).
Note: If the user ID on one or more connected databases has already been set, by either the SETUSERID or SET-DB-CLIENT functions, the user ID specified by this method is ignored and no attempt is made to reset the user ID on those particular databases. Also, any subsequent calls to either the SETUSERID or SET-DB-CLIENT functions will override the database user ID set by this method.When a user ID is set on a connected database, the AVM uses that user ID to determine whether the user has permission to access tables and fields in that particular database.
Return type: LOGICAL
Applies to: SECURITY-POLICY system handle
client-principal-handle
A handle to a sealed Client-principal object. The Client-principal object must be created in an authentication domain that is registered in the application’s trusted authentication domain registry. If the Client-principal object is not sealed, or the handle is the Unknown value (?
), the AVM generates a run-time error and the current application’s user ID remains unchanged.If the LOGIN-STATE attribute for the sealed Client-principal object is not "LOGIN", the AVM generates a run-time error and the current user ID remains unchanged.
If successful, this method returns TRUE. Otherwise, it returns FALSE.
When a user ID is set for an application, and at least one connected audit-enabled database, this method generates an audit event and creates an audit record for the event in all connected audit-enabled databases on which it was set according to each database’s current audit policy settings.
You can use this method, instead of the SETUSERID function or the SET-DB-CLIENT function, to set a database user ID when the user ID is not in the _User table. You can also use the SETUSERID function or the SET-DB-CLIENT function to override the user ID set by this method for one or more connected databases.
See also: Client-principal object handle, SET-DB-CLIENT function, SETUSERID function
OpenEdge Release 10.2B
|